【发布时间】:2021-08-31 07:26:07
【问题描述】:
尝试在 Heroku 云中部署 spring-boot 应用程序,出现错误无法编译 java 应用程序,但这在我的本地机器上运行良好。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project smartcontactmanager: Compilation failure
[ERROR] /tmp/build_f6591bb6/src/main/java/com/smart/config/CustomUserDetails.java:[29,28] cannot find symbol
[ERROR] symbol: method of(org.springframework.security.core.authority.SimpleGrantedAuthority)
[ERROR] location: interface java.util.List
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
! ERROR: Failed to build app with Maven
We're sorry this build is failing! If you can't find the issue in application code,
please submit a ticket so we can help: https://help.heroku.com/
! Push rejected, failed to compile Java app.
! Push failed
【问题讨论】:
-
如果这在您的系统中运行良好,那么您可以尝试查看 git 跟踪的文件吗?您可能会错过将一个文件推送到heroku。
-
所有文件工作正常,不明白为什么我收到错误
-
如果编译失败,则可能是一些依赖问题,或者某些文件可能没有推送到 Heroku。你可以试试
git diff heroku/master看看有没有什么问题。 -
得到上述问题的解决方案,问题归还列表
标签: java spring-boot heroku