码迷,mamicode.com
首页 > 其他好文 > 详细

资产项目部署中遇到的问题与解决方法

时间:2019-08-27 21:17:08      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:too long   问题:   error   mamicode   引用   解决   org   article   mvn   

1.问题:IDEA不显示RunDashboard窗口

参考:

https://jingyan.baidu.com/article/ce4366495a1df73773afd3d3.html

 

2.报错:Error running ‘HbaseServiceApplication‘: Command line is too long. Shorten command line for HbaseServiceApplication or also for Spring Boot default configuration.

参考:

https://blog.csdn.net/ZXJ_1223/article/details/80611089

 

3.报错:RedisConnectionException: Unable to connect to localhost:6379

详细情况:在ass****nage项目下新建一个模块,只打算实现最基础的注册Eureka Server功能,并没有添加Redis相关引用。

问题分析:多模块项目中,子模块会从父项目中继承POM相关内容,但是配置文件中如果没有相关配置内容,相关POM组件就会报错,ass****nage项目中,配置文件由configservice进行管理,因此模块配置文件中不能缺少访问configservice的相关设置。原配置文件为:

server.port=7077
spring.application.name=feiservice,common
eureka.client.service-url.defaultZone=http://****:****@10.200.101.****:7000/eureka/,http://****:****@10.200.101.****:7000/eureka/
eureka.instance.prefer-ip-address=true
eureka.instance.instance-id=${spring.application.name}:${spring.cloud.client.ip-address}:${server.port}

添加如下内容:

spring.cloud.config.uri=http://10.200.101.****:7001,10.200.101.****:7001
spring.cloud.config.username=****
spring.cloud.config.password=****
spring.cloud.config.profile=dev

 

4.报错:模块既不显示在Run Dashboard中,也无蓝色方块,如下:

技术图片

分析:在模块下没有发现usercenterservice.iml文件,在文件modules.xml中也没有发现对该文件的引用,如下:

技术图片

解决方法:进入模块文件夹下,执行命令 mvn idea:module 生成 usercenterservice.iml 文件,把该文件加入到modules.xml中,问题解决!如下:

技术图片

技术图片

技术图片

技术图片

参考:https://ask.csdn.net/questions/667256 ; https://blog.csdn.net/saygood999/article/details/95626365

 

5.打包失败

技术图片

报错:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project eurekaservice: There are test failures.
[ERROR] 
[ERROR] Please refer to D:\Development\asset\assetmanage-master-190827\eurekaservice\target\surefire-reports for the individual test results.

解决方法:

打开全局pom.xml文件,在<properties></properties>中添加<maven.test.skip>true</maven.test.skip>属性,如下:

技术图片

再次打包,先Maven->clean,再Maven->install,打包成功,如下:

技术图片

可以在Maven库中找到打包后的jar包

技术图片

 

 

参考:

https://blog.csdn.net/ruanjian1111ban/article/details/80890539

https://xinklabi.iteye.com/blog/2075345

资产项目部署中遇到的问题与解决方法

标签:too long   问题:   error   mamicode   引用   解决   org   article   mvn   

原文地址:https://www.cnblogs.com/ratels/p/10956718.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!