项目开发
- 环境安装
- 安装JDK、Maven、Mysql、redis、zookeeper、activeMq、Navicat、idea、windows下安装git.exe.配置好对应的环境变量。
- 在idea中配置jdk路径 File -> Project Structure
- 在idea中配置Maven路径File -> Settings -> Build Tools-> Maven
- 在idea中配置git路径File -> Settings -> Version Control-> Git
- 工具栏Maven Project -> reimport All Maven Projects 安装所有依赖jar
- Maven profile编译打包所有服务及web模块
Edit Configuration -> + -> Maven 添加profile ,command Line设置clean install -Dmaven.test.skip=true -Pdev
或者直接Run Maven Goal即可。本地测试web使用Tomcat Server,方法同上。
1.启动irdms-service-equipment服务(本服务引入需要调用的接口服务API,本项目是引入特定的façade模块)
2.启动irdms-web-equipment项目(tomcat)
3.测试接口
http://ip:port/web-equipment/equipment/queryEquipmentListByEquipmentUserIdAndEquipmentType
先取token:启动
curl -X POST "http://localhost:8081/wechat/getToken" -H "Content-Type:application/json" -d '{"currentUserId":” 04c21056ecb34371b52b9c78e5d9e367”,"currentUserType":"equi"}'
得到token: eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJmMWVjY2M2Mzc3Nzc0NDBkYTI4YzVjOGM4MmJkNmI4ZSIsInN1YiI6IntcInVzZXJJZFwiOlwiMzA5NzhjZTgwYzM1NGNmMGJiY2NkMDQxZTFmZTNiYmZcIixcInVzZXJ
UeXBlXCI6XCJlcXVcIn0iLCJpc3MiOiJJUkRNUyIsImlhdCI6MTUyNDAzNDE2NSwiZXhwIjoxNTI0MTIwNTY1fQ.mcNtdVSA2RL0Krz_jpdFxZEFcO3LdjfeaAS9grb0nyo
接口2.3.3.6 测试用例
curl -X POST "localhost:8080/equipment/queryEquipmentGoodsByEquipmentId" \
-d '{"equipmentId":"1","pageNum":1,"pageSize":2}' \
-H "Content-Type: application/json" \
-H
"Token:eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJmMWVjY2M2Mzc3Nzc0NDBkYTI4YzVjOGM4MmJkNmI4ZSIsInN1YiI6IntcInVzZXJJZFwiOlwiMzA5NzhjZTgwYzM1NGNmMGJiY2NkMDQxZTFmZTNiYmZcIixcInVzZXJUeXBlXCI6XCJlcXVcIn0iLCJpc3MiOiJJUkRNUyIsImlhdCI6MTUyNDAzNDE2NSwiZXhwIjoxNTI0MTIwNTY1fQ.mcNtdVSA2RL0Krz_jpdFxZEFcO3LdjfeaAS9grb0nyo"
Eclipse error:
D:\project\backend\irdms-web-equipment\target\m2e-wtp\web-resources\META-INF\MANIFEST.MF. D:\project
Solution
Project - Clean : https://blog.csdn.net/liliang_11676/article/details/79272348
来源:oschina
链接:https://my.oschina.net/u/2942603/blog/1920764