✅ 操作成功!

Consider defining a bean of type ‘org.springframework.security.config.annotation.ObjectPostProcessor

发布时间:2023-06-12 作者:admin 来源:文学

Consider defining a bean of type ‘org.springframework.security.config.annotation.ObjectPostProcessor

Consider defining a bean of type ‘org.springframework.security.config.annotation.ObjectPostProcessor

报错信: Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. 2020-05-15 00:05:12 ERROR [main]o.s.b.d.LoggingFailureAnalysisReporter [LoggingFailureAnalysisReporter.java : 40] -


APPLICATION FAILED TO START


Description:

A component required a bean of type ‘org.springframework.security.config.annotation.ObjectPostProcessor’ that could not be found.

Action:

Consider defining a bean of type ‘org.springframework.security.config.annotation.ObjectPostProcessor’ in your configuration.

解决: 启动类添加注解:

@EnableGlobalMethodSecurity(prePostEnabled = true)

👁️ 阅读量:0