2022年3月2日 星期三

The bean 'localeResolver', defined in class path resource

在組態檔application.properties加入以下設定
spring.main.allow-bean-definition-overriding=true

參考
https://stackoverflow.com/questions/63658346/a-bean-with-that-name-has-already-been-defined-in-class-path-resource-path-and


完整錯誤訊息:
The bean 'localeResolver', defined in class path resource [com/aabbcc/config/WebConfig.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class] and overriding is disabled.

沒有留言:

張貼留言