Browse Source

【更新】新增postgres的配置,适配postgres

pull/84/head
andrewgreat 2 years ago committed by 小诺
parent
commit
539cec483f
  1. 10
      snowy-web-app/pom.xml
  2. 1964
      snowy-web-app/src/main/resources/_sql/snowy_postgres.sql
  3. 13
      snowy-web-app/src/main/resources/application.properties

10
snowy-web-app/pom.xml

@ -22,6 +22,7 @@
<oracle.connector.java.version>21.5.0.0</oracle.connector.java.version>
<oracle.nls.orai18n.version>19.7.0.0</oracle.nls.orai18n.version>
<mssql.connector.java.version>9.4.1.jre8</mssql.connector.java.version>
<postgres.connector.java.version>42.5.1</postgres.connector.java.version>
</properties>
<dependencies>
@ -49,10 +50,17 @@
</dependency>
<!-- mysql -->
<dependency>
<!-- <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.java.version}</version>
</dependency>-->
<!-- postgresql -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgres.connector.java.version}</version>
</dependency>
<!-- oracle -->

1964
snowy-web-app/src/main/resources/_sql/snowy_postgres.sql

File diff suppressed because one or more lines are too long

13
snowy-web-app/src/main/resources/application.properties

@ -21,9 +21,16 @@ spring.servlet.multipart.max-file-size=100MB
#########################################
# mysql
spring.datasource.dynamic.datasource.master.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.dynamic.datasource.master.url=jdbc:mysql://localhost:3306/snowy?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&useInformationSchema=true
spring.datasource.dynamic.datasource.master.username=root
#spring.datasource.dynamic.datasource.master.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.dynamic.datasource.master.url=jdbc:mysql://localhost:3306/snowy?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&useInformationSchema=true
#spring.datasource.dynamic.datasource.master.username=root
#spring.datasource.dynamic.datasource.master.password=123456
#spring.datasource.dynamic.strict=true
# postgres
spring.datasource.dynamic.datasource.master.driver-class-name=org.postgresql.Driver
spring.datasource.dynamic.datasource.master.url=jdbc:postgresql://localhost:5432/snowy
spring.datasource.dynamic.datasource.master.username=postgres
spring.datasource.dynamic.datasource.master.password=123456
spring.datasource.dynamic.strict=true

Loading…
Cancel
Save