- 鼠标右键gitbash
gitbash的相关命令
git clone git项目地址,下载好的文件夹中的git是别人的要删掉。
打开自己项目的文件夹把这个文件导入。
在父模块的pom文件中的modes中添加刚刚导入的模块名称以添加到整个项目中 - 修改逆向工程配置文件
- 生成代码之后复制进项目中,因为每个微服务都需要用到相同的配置所以创建一个公共的微服务。
并添加一些其他微服务公共的配置renren-fast----utils包下的Query和PageUtils、R、Constant复制到common项目的java/com.yxj.common.utils下
把@RequiresPermissions这些注解掉,因为是shiro的
复制renren-fast中的xss包粘贴到common的java/com.yxj.common目录下。
还复制了exception文件夹,对应的位置关系自己观察一下就行
注释掉product项目下类中的//import org.apache.shiro.authz.annotation.RequiresPermissions;,他是shiro的东西
注释renren-generator\src\main\resources\template/Controller中所有的
# @RequiresPermissions。
# import org.apache.shiro.authz.annotation.RequiresPermissions;总之什么报错就去renren-fast里面找。
java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
编写测试类运行时这里报了一个错误
查了一些资料发现自己的两个包名不相同这里是我改好了的
然后报了另一个错误:driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
com.msql.jdbc这种写法已经太老了弃用了改成com.mysql.cj.jdbc.Driver成功运行
4.其他模块按照这套流程创建代码并测试