摘要: @Id @GeneratedValue(strategy = GenerationType.IDENTITY) protected Integer id; 以上指定jpa自动生成一个id字段,并且是自增长的,如果是AUTO,那么就是下面的生成方式,多一个表。 并没有将b_xs里面的表的id变成自增长 阅读全文
posted @ 2020-12-02 18:22 jiduoduo 阅读(436) 评论(0) 推荐(0)
摘要: 做单元测试的时候,报spring boot no tests found with test runner 'JUnit5'。 解决: 将junit5改为junit4就可以顺利测试。 阅读全文
posted @ 2020-12-02 17:58 jiduoduo 阅读(1526) 评论(0) 推荐(0)
摘要: 如果同时存在application.properties与application.yml,那么SB会如何去读呢? 默认是先读properties的,然后才会去读yaml文件。 以图中有几个配制文件,那么系统会如何去读呢? 1、会先读application.properties,然后如何检测到里面指定 阅读全文
posted @ 2020-12-02 16:57 jiduoduo 阅读(384) 评论(0) 推荐(0)
摘要: lombok自带一个日志注解,在需要输出日志的地方加入@Slf4j就可以。 下面就可以调用log.info('xxx'); error,debug等方法。 那么我们如何才能够将日志文件输出到指定文件呢?这样便于我们查询,万一有错误,如果没有日志文件,那是很糟糕的事。 1、要确保pom.xml里面有这 阅读全文
posted @ 2020-12-02 15:49 jiduoduo 阅读(14001) 评论(0) 推荐(0)
摘要: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intent 阅读全文
posted @ 2020-12-02 11:20 jiduoduo 阅读(7358) 评论(0) 推荐(0)
摘要: 详细描述: Field xsMapper in com.xxx.controller.XsController required a bean of type 'com.xxx.mapper.XsMapper' that could not be found. The injection point 阅读全文
posted @ 2020-12-02 10:02 jiduoduo 阅读(1025) 评论(0) 推荐(1)