Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
鲁鑫
topsun-bpm
Commits
ce804e57
Commit
ce804e57
authored
Mar 25, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
不加载mybatis
parent
f86d195a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
47 deletions
+47
-47
applicationContext.xml
huigou-xt/src/main/resources/applicationContext.xml
+1
-1
pom.xml
pom.xml
+3
-3
pom.xml
topsun-xt/pom.xml
+2
-2
pom.xml
topsun/pom.xml
+6
-6
MyBatisConfig.java
...src/main/java/com/huigou/topsun/config/MyBatisConfig.java
+35
-35
No files found.
huigou-xt/src/main/resources/applicationContext.xml
View file @
ce804e57
...
@@ -56,5 +56,5 @@
...
@@ -56,5 +56,5 @@
<!– 上科大 –>
<!– 上科大 –>
<import resource="classpath:config/spring/spring-tech.xml" />-->
<import resource="classpath:config/spring/spring-tech.xml" />-->
<
import
resource=
"classpath:config/spring/spring-mybatis-plus.xml"
/
>
<
!--<import resource="classpath:config/spring/spring-mybatis-plus.xml"/>--
>
</beans>
</beans>
\ No newline at end of file
pom.xml
View file @
ce804e57
...
@@ -347,18 +347,18 @@
...
@@ -347,18 +347,18 @@
</dependency>
</dependency>
<!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus -->
<!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus -->
<dependency>
<
!--<
dependency>
<groupId>com.baomidou</groupId>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<artifactId>mybatis-plus</artifactId>
<version>3.5.4</version>
<version>3.5.4</version>
</dependency>
</dependency>
<!--自3.5.4开始,传统Spring项目集成需要手动引入一下mybatis-spring.-->
<!–自3.5.4开始,传统Spring项目集成需要手动引入一下mybatis-spring.–>
<dependency>
<dependency>
<groupId>org.mybatis</groupId>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<artifactId>mybatis-spring</artifactId>
<version>2.1.1</version>
<version>2.1.1</version>
</dependency>
</dependency>
-->
<dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<artifactId>
hutool-all
</artifactId>
...
...
topsun-xt/pom.xml
View file @
ce804e57
...
@@ -185,10 +185,10 @@
...
@@ -185,10 +185,10 @@
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<
!--<
dependency>
<groupId>com.baomidou</groupId>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<artifactId>mybatis-plus</artifactId>
</dependency>
</dependency>
-->
</dependencies>
</dependencies>
<build>
<build>
<finalName>
topsun-xt
</finalName>
<finalName>
topsun-xt
</finalName>
...
...
topsun/pom.xml
View file @
ce804e57
...
@@ -146,21 +146,21 @@
...
@@ -146,21 +146,21 @@
<artifactId>
huigou-data
</artifactId>
<artifactId>
huigou-data
</artifactId>
</dependency>
</dependency>
<dependency>
<
!--<
dependency>
<groupId>com.baomidou</groupId>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<artifactId>mybatis-plus</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.mybatis</groupId>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<artifactId>mybatis</artifactId>
<version>3.5.13</version>
<version>3.5.13</version>
<scope>compile</scope>
<scope>compile</scope>
</dependency>-->
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.google.protobuf
</groupId>
<groupId>
com.google.protobuf
</groupId>
<artifactId>
protobuf-java
</artifactId>
<artifactId>
protobuf-java
</artifactId>
...
...
topsun/src/main/java/com/huigou/topsun/config/MyBatisConfig.java
View file @
ce804e57
package
com
.
huigou
.
topsun
.
config
;
//
package com.huigou.topsun.config;
//
import
com.baomidou.mybatisplus.annotation.DbType
;
//
import com.baomidou.mybatisplus.annotation.DbType;
import
com.baomidou.mybatisplus.core.config.GlobalConfig
;
//
import com.baomidou.mybatisplus.core.config.GlobalConfig;
import
com.baomidou.mybatisplus.core.incrementer.IKeyGenerator
;
//
import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
import
org.springframework.context.annotation.Bean
;
//
import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
//
import org.springframework.context.annotation.Configuration;
//
import
java.util.Arrays
;
//
import java.util.Arrays;
//
//
@Configuration
//
@Configuration
public
class
MyBatisConfig
{
//
public class MyBatisConfig {
//
@Bean
//
@Bean
public
GlobalConfig
globalConfiguration
()
{
//
public GlobalConfig globalConfiguration() {
GlobalConfig
conf
=
new
GlobalConfig
();
//
GlobalConfig conf = new GlobalConfig();
conf
.
setDbConfig
(
new
GlobalConfig
.
DbConfig
().
setKeyGenerators
(
Arrays
.
asList
(
//
conf.setDbConfig(new GlobalConfig.DbConfig().setKeyGenerators(Arrays.asList(
// h2 1.x 的写法(默认 2.x 的写法)
//
// h2 1.x 的写法(默认 2.x 的写法)
new
IKeyGenerator
()
{
//
new IKeyGenerator() {
//
@Override
//
@Override
public
String
executeSql
(
String
incrementerName
)
{
//
public String executeSql(String incrementerName) {
return
"select "
+
incrementerName
+
".nextval"
;
//
return "select " + incrementerName + ".nextval";
}
//
}
//
@Override
//
@Override
public
DbType
dbType
()
{
//
public DbType dbType() {
return
DbType
.
POSTGRE_SQL
;
//
return DbType.POSTGRE_SQL;
}
//
}
}
//
}
)));
//
)));
return
conf
;
//
return conf;
}
//
}
}
//
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment