File tree Expand file tree Collapse file tree 3 files changed +12
-25
lines changed
springboot2.5/springboot-mybatis-plus-and-jpa
java/com/zsx/springbootmybatisplus/config Expand file tree Collapse file tree 3 files changed +12
-25
lines changed Original file line number Diff line number Diff line change 6666 <!-- <scope>runtime</scope>-->
6767 </dependency >
6868
69- <dependency >
70- <groupId >org.apache.derby</groupId >
71- <artifactId >derby</artifactId >
72- <scope >runtime</scope >
73- </dependency >
74-
7569 <dependency >
7670 <groupId >com.github.pagehelper</groupId >
7771 <artifactId >pagehelper</artifactId >
Original file line number Diff line number Diff line change 1919public class MybatisPlusConfig {
2020
2121
22- //@Bean
23- //public MybatisPlusInterceptor mybatisPlusInterceptor() {
24- // MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
25- //
26- // //interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
27- // interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.SQLITE));
28- //
29- // return interceptor;
30- //}
22+ @ Bean
23+ public MybatisPlusInterceptor mybatisPlusInterceptor () {
24+ MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor ();
25+
26+ interceptor .addInnerInterceptor (new PaginationInnerInterceptor (DbType .MYSQL ));
27+
28+ return interceptor ;
29+ }
3130
3231
3332 /**
Original file line number Diff line number Diff line change @@ -9,16 +9,10 @@ server:
99
1010spring :
1111 datasource :
12- driver-class-name : org.apache.derby.jdbc.EmbeddedDriver
13- url : jdbc:derby:memory:myDB;create=true
14- username : sa
15- password :
16-
17- jpa :
18- database-platform : org.hibernate.dialect.DerbyTenSevenDialect
19- properties :
20- hibernate :
21- dialect : org.hibernate.dialect.DerbyTenSevenDialect
12+ driver-class-name : com.mysql.jdbc.Driver
13+ url : jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
14+ username : root
15+ password : root
2216
2317
2418
You can’t perform that action at this time.
0 commit comments