集成pagehelper
<!--pagehelper 不能引用pagehelper-spring-boot-starter否则会冲突-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>4.1.4</version>
</dependency>
添加controller
guns系统中找不到@ComponentScan注解,造成controller等bean不能存放在其他路径如com.young.**。
如有哪位大神知道,请帮留言说明一下。

无法被识别的controller

需要添加到cn.stylefeng.guns.modular

mapper路径说明
在SingleDataSourceConfig中可以看到关于@MapperScan注解了mapper的解析路径

mybatis问题遇到一个问题:自增长的获取不能带对象明,暂时怀疑是版本问题

#错误信息
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Error getting generated key or setting result to parameter object. Cause: org.apache.ibatis.executor.ExecutorException: No setter found for the keyProperty 'websocketLinkInfo.db_id' in 'com.younghare.pojo.WebsocketLinkInfo'.
正常的获取自增长mapper

api接口放开校验权限
guns集成了Shiro、JWT(API接口权限),正常的方法都需要携带Json web token;
全文搜索login,你很快可以看到放开权限校验的设置。


如果你希望被集成的api不需要权限校验,那么在Const.java中添加配置。


idea中安装lombok
由于guns中使用了lombok,造成大量的get和set访问无法被识别。需要安装lombok插件,重启即可
IntelliJ IDEA lombok插件的安装和使用--百度经验

网友评论