很明显的重名错误,解决方式有两种:1.取别名;2.添加配置
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'hiddenHttpMethodFilter', defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [com/example/test/config/WebMvcConfig.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
在配置文件中添加:即可
spring:
main:
allow-bean-definition-overriding: true
完美解决