摘要: 有两种实现方式 一、在application.yml添加如下配置 mybatis-plus: # config-location: classpath:mybatis/mybatis-config.xml mapper-locations: classpath*:mybatis/mapper/**/ 阅读全文
posted @ 2022-04-25 23:02 jamstack 阅读(4950) 评论(0) 推荐(0) 编辑
摘要: 主启动类所在模块的pom.xml,添加junit依赖,如下: <!-- springboot的测试框架,里面有对junit4的依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot 阅读全文
posted @ 2022-04-25 21:49 jamstack 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 一、父模块的pom.xml添加HiKariCP连接池依赖 <!-- HiKariCP连接池 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artif 阅读全文
posted @ 2022-04-25 21:47 jamstack 阅读(552) 评论(0) 推荐(0) 编辑
摘要: spring boot的配置文件分为properties和yaml两种格式,用下面这个网站提供的转换工具,可以方便的进行格式互转 https://toyaml.com/index.html 阅读全文
posted @ 2022-04-25 21:16 jamstack 阅读(778) 评论(0) 推荐(0) 编辑
摘要: 背景: 父子工程项目结构,主启动类在子工程app模块 一、在父模块的pom.xml里引入mybatis-plus依赖 <!-- mybatis plus --> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus 阅读全文
posted @ 2022-04-25 21:10 jamstack 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 背景: spring boot 2.1.0 集成 mybatis-plus后,按照官方文档的例子,在父模块里,写了一个单元测试,如下: @RunWith(SpringRunner.class) @SpringBootTest() public class SampleTest { private s 阅读全文
posted @ 2022-04-25 20:56 jamstack 阅读(1111) 评论(0) 推荐(0) 编辑
摘要: 在controller里定义了一个普通的get接口,通过postman访问出现上图的401错误,查看启动信息,发现spring security也启动了,但是pom.xml里并没有引入spring security的依赖,不管是重新clean打包,还是执行 mvn dependency:purge- 阅读全文
posted @ 2022-04-25 18:42 jamstack 阅读(1443) 评论(0) 推荐(0) 编辑
摘要: 一、查看topic列表 mqadmin.cmd topicList -n localhost:9876 二、查看consumer mqadmin.cmd consumerProgress -n localhost:9876 参考资料 https://www.cnblogs.com/gmq-sh/p/ 阅读全文
posted @ 2022-04-25 14:41 jamstack 阅读(346) 评论(0) 推荐(0) 编辑