Springboot's properties already contains a lot of default configurations. What is the purpose of using @ Configuration configuration again?

for example, wouldn"t it be better to configure it uniformly in the properties file?


Properties deals with the externalization of configuration information, that is, our commonly used configuration file
@ Configuration is the Java Config core of Spring, and the definition of Bean through Java
is different.
in Spring Boot, Starter automatically enables a lot of Bean, for us. The configuration information of these Bean is exposed through properties for users to adjust parameters, but it is not by adjusting the properties file that you can configure all the responsible Bean configuration under Bean, but you still need to use @ Configuration mode, such as Spring Security WebSecurityConfigurerAdapter configuration

.
Menu