一.自动配置原理
//表示这是一个配置类
@Configuration(
proxyBeanMethods = false
)
//自动配置属性:ServerProperties
@EnableConfigurationProperties({ServerProperties.class})
//spring底层注解:根据不同的条件判断当前配置或者类是否生效
@ConditionalOnWebApplication(
type = Type.SERVLET
)
@ConditionalOnClass({CharacterEncodingFilter.class})
@ConditionalOnProperty(
prefix = "server.servlet.encoding",
value = {"enabled"},
matchIfMissing = true
)