Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'freeMarkerConfigurer' defined in class path resource [org/springframework/boot/autoconfigure/freemarker/FreeMarkerAutoConfiguration$FreeMarkerWebConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: freemarker.template.Configuration.<init>(Lfreemarker/template/Version;)V
诡异的问题。
没有Maven没有直接引入Freemarker却报错了。
springboot自动引入Freemarker,不是根本原因。
@EnableAutoConfiguration(exclude = { FreeMarkerAutoConfiguration.class })
配置这个也解决不了。
最终发现是本地环境问题。
maven 不同项目 层次依赖,Freemarker最上次是 provided,版本过低。
以上说的不清楚,大概就是 版本要用合适的,不要随便引入包。
出了问题,多试试不同的解决办法。
烦躁。