Spring 4与@Conditional API一起提供了一个很好的自动配置特性。Spring还有许多内置的@Enable*配置(例如@EnableWebMvc、@EnableCaching、@EnableScheduling.)。但是,当我应该显式地使用这些@Enable**配置,或者我只需要自动配置并定义一些定制bean来覆盖就够了。请解释一下这个问题。
我有一个运行中的SpringBoot2.0.1应用程序。升级到SpringBoot2.1.8后,在启动过程中会出现以下错误:
The bean 'templateEngine', defined in class path resource [org/springframework我不使用AutoConfiguration,所以我不明白为什么ThymeleafAutoConfiguration类会起作用。另外,我不希望使用自动配置的templateEngine,而是使用我自己对template