spring cloud 项目打包时,有一个数据库配置的是现场的库,所以一直不成功,怎么办?

 

package结果:

[INFO] network-monitoring-ue-status-synchronization-task .. SKIPPED
[INFO] network-monitoring-ue-big-data-task ................ SKIPPED
[INFO] network-monitoring-web-auth-front .................. SKIPPED
[INFO] network-monitoring-failure-reporting ............... SKIPPED
[INFO] random-number ...................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:07 min
[INFO] Finished at: 2019-09-07T09:31:28+08:00
[INFO] Final Memory: 87M/471M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project network-monitoring-omc-connector-service: There are test failures.
[ERROR] 
[ERROR] Please refer to C:\uer\package\network_monitoring\network-monitoring-omc-connector-service\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 

根据错误可以判断,打包时自动进行了数据库的连接测试,结果必然是连不上,测试不通过。

最终,我尝试将所有的测试类注释掉,package成功。

你可能感兴趣的:(Spring,Boot,Web开发)