2020年4月23日

springboot 项目启动报注册重复, A bean with that name has already been defined and overridin

摘要: springboot 启动时由于多次注册了同一个bean,导致报错: A bean with that name has already been defined and overridin 可能产生的原因:0、启动类application都是自动扫描本包及其以下的包。就是application主类 阅读全文

posted @ 2020-04-23 10:28 陈惟鲜的博客 阅读(7329) 评论(0) 推荐(0) 编辑

junit springboot 跑测试时,打印出当前执行的test方法信息

摘要: 但有时候还是需要使用junit做测试。方便日后参考。 目前流行的springboot 的junit测试,在很多时候需要使用。当前执行的方法是什么,我们只需要引入用注解方法就可以了。 pom.xml引入依赖jar包 <!-- 测试 --> <dependency> <groupId>org.sprin 阅读全文

posted @ 2020-04-23 10:18 陈惟鲜的博客 阅读(2095) 评论(0) 推荐(0) 编辑

导航