Skip to content

Commit 633a0ea

Browse files
committed
💩 📸 🔍 🔨 ⏪ 🎉 📄
1 parent 3ce3309 commit 633a0ea

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

springboot2.5/springboot-mybatis-plus-and-jpa/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
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>

springboot2.5/springboot-mybatis-plus-and-jpa/src/main/java/com/zsx/springbootmybatisplus/config/MybatisPlusConfig.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
public 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
/**

springboot2.5/springboot-mybatis-plus-and-jpa/src/main/resources/application.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@ server:
99

1010
spring:
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

0 commit comments

Comments
 (0)