From e8925231bb658c3b21bf1dc4902366210db39f73 Mon Sep 17 00:00:00 2001 From: root <123> Date: Thu, 26 Nov 2020 10:27:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?20201126=20=20=E8=BF=81=E7=A7=BBpostgresql?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 41 ++++++++--- .../controller/rest/FileSubmitController.java | 4 +- .../controller/rest/VfileMenuController.java | 1 + src/main/resources/application-dev.yml | 24 ++++--- src/main/resources/generator.xml | 39 ++++++----- src/main/resources/generator_mysql.xml | 66 ++++++++++++++++++ src/main/resources/jdbc.properties | 15 ++-- .../resources/mapper/DataSubmitMapper.xml | 2 +- src/main/resources/mapper/VfileMenuMapper.xml | 5 +- src/main/resources/postgresql-42.2.18.jar | Bin 0 -> 1004719 bytes 10 files changed, 147 insertions(+), 50 deletions(-) create mode 100644 src/main/resources/generator_mysql.xml create mode 100644 src/main/resources/postgresql-42.2.18.jar diff --git a/pom.xml b/pom.xml index c63fed5..4304783 100644 --- a/pom.xml +++ b/pom.xml @@ -47,17 +47,29 @@ spring-boot-starter-tomcat provided - + + + + + + + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 1.3.2 + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + + org.postgresql + postgresql + 42.2.18 + @@ -71,6 +83,7 @@ spring-boot-devtools runtime + + + + + + + - + + + @@ -19,6 +17,7 @@ + @@ -26,12 +25,12 @@ + + - - @@ -39,22 +38,24 @@ - - + - - + + + + - - + + + + - -
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ \ No newline at end of file diff --git a/src/main/resources/jdbc.properties b/src/main/resources/jdbc.properties index e791d85..2748822 100644 --- a/src/main/resources/jdbc.properties +++ b/src/main/resources/jdbc.properties @@ -1,8 +1,13 @@ -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dhmanage?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false -#spring.datasource.driverClassName=com.mysql.jdbc.Driver -spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -spring.datasource.username=root -spring.datasource.password=123 +#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dhmanage?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false +##spring.datasource.driverClassName=com.mysql.jdbc.Driver +#spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver +#spring.datasource.username=root +#spring.datasource.password=123 + +spring.datasource.url=jdbc:postgresql://192.168.1.211:5432/postgres +spring.datasource.username=postgres +spring.datasource.password=123456 +spring.datasource.driver-class-name=org.postgresql.Driver #Mybatis扫描 mybatis.mapper-locations=classpath*:com/**/mapper/**.xml diff --git a/src/main/resources/mapper/DataSubmitMapper.xml b/src/main/resources/mapper/DataSubmitMapper.xml index 4257df8..d7eeae7 100644 --- a/src/main/resources/mapper/DataSubmitMapper.xml +++ b/src/main/resources/mapper/DataSubmitMapper.xml @@ -6,7 +6,7 @@ WARNING - @mbg.generated --> - + diff --git a/src/main/resources/mapper/VfileMenuMapper.xml b/src/main/resources/mapper/VfileMenuMapper.xml index 344cbc5..3a6f3d6 100644 --- a/src/main/resources/mapper/VfileMenuMapper.xml +++ b/src/main/resources/mapper/VfileMenuMapper.xml @@ -85,9 +85,10 @@ and file_security = #{vfileMenu.fileSecurity} - limit #{offset}, #{limit} - + LIMIT #{limit} OFFSET #{offset} + +