简体   繁体   English

导出Spring Boot JAR以进行远程部署

[英]Exporting Spring Boot JAR for remote deployment

I need to export a JAR file for remote deployment of my spring boot application. 我需要导出JAR文件以进行我的Spring Boot应用程序的远程部署。 I am successfully able to generate it for my local deployment. 我可以为本地部署成功生成它。 But when I change the mySQL database credentials to my remote host's local mySQL client, the jar export is failing with 但是,当我将mySQL数据库凭据更改为远程主机的本地mySQL客户端时,jar导出失败,并且

Access denied for user 'root'@'localhost' (using password: YES) 用户'root'@'localhost'的访问被拒绝(使用密码:是)

I am using the mvn package command to export jar file. 我正在使用mvn package命令导出jar文件。 Why is the package command trying to execute the project rather than just packaging it? 为什么package命令尝试执行项目而不是仅打包项目? How can I export a jar for remote deployment? 如何导出jar以进行远程部署?

I suppose it runs tests where uses db connection properties. 我想它会在使用数据库连接属性的地方运行测试。 You can skip it for build, try to add 您可以跳过它进行构建,尝试添加

-Dmaven.test.skip to your command -Dmaven.test.skip到您的命令

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM