如何解决`@PreAuthorize` 与 spring-native 触发打包错误:`repeated interface: org.springframework.aop.SpringProxy`
我正在尝试在 maven multi-module project 中为 spring-boot 应用程序构建本机映像。
一旦我用 @PreAuthorize
修饰 @Controller 方法,本机图像生成就会失败并显示以下消息。
遵循 spring-native 示例,我在应用程序类上尝试了使用(如 security-method-class-proxies
中所做的)和不使用(如 security-method
中所做的)@AotProxyHint
,但这没有任何区别。
错误:
[INFO] [creator] Error: Error parsing dynamic proxy configuration in file:/workspace/meta-inf/native-image/org.springframework.aot/spring-aot/proxy-config.json:
[INFO] [creator] java.lang.IllegalArgumentException: repeated interface: org.springframework.aop.SpringProxy
[INFO] [creator] Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option DynamicProxyConfigurationResources.
[INFO] [creator] Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
[INFO] [creator] Error: Image build request Failed with exit status 1
[INFO] [creator] unable to invoke layer creator
[INFO] [creator] unable to contribute native-image layer
[INFO] [creator] error running build
[INFO] [creator] exit status 1
[INFO] [creator] ERROR: Failed to build: exit status 1
知道为什么吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。