diff --git a/java/pom.xml b/java/pom.xml index 3663742..23fd09a 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -1,11 +1,11 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.boot spring-boot-starter-parent - 2.2.6.RELEASE + 2.1.5.RELEASE com.hzu @@ -21,20 +21,30 @@ org.springframework.boot - spring-boot-starter-security + spring-boot-starter-data-jpa org.springframework.boot spring-boot-starter-jdbc + + com.alibaba + druid + 1.1.4 + org.springframework.boot spring-boot-starter-web - org.mybatis.spring.boot - mybatis-spring-boot-starter - 2.1.2 + mysql + mysql-connector-java + runtime + + + org.springframework.boot + spring-boot-starter-test + test @@ -43,19 +53,9 @@ true - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - - - org.springframework.security - spring-security-test + org.junit.jupiter + junit-jupiter + RELEASE test diff --git a/java/src/main/java/com/hzu/bookingsystem/VO/test.java b/java/src/main/java/com/hzu/bookingsystem/VO/test.java deleted file mode 100644 index e69de29..0000000 diff --git a/java/src/main/resources/application.properties b/java/src/main/resources/application.properties index 0aaf2ac..9e0cb59 100644 --- a/java/src/main/resources/application.properties +++ b/java/src/main/resources/application.properties @@ -2,11 +2,4 @@ server.tomcat.uri-encoding=UTF-8 server.servlet.context-path=/lb server.port=8080 -### mysql连接信息 -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/lab_booking?characterEncoding=utf-8&serverTimezone=UTC -### 用户名 -spring.datasource.username=root -### 密码 -spring.datasource.password=123456 -### 驱动 -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver \ No newline at end of file +spring.jpa.show-sql=true diff --git a/java/src/main/resources/application.yml b/java/src/main/resources/application.yml new file mode 100644 index 0000000..62da168 --- /dev/null +++ b/java/src/main/resources/application.yml @@ -0,0 +1,26 @@ +spring: + datasource: + username: root + password: 123456 + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://127.0.0.1:3306/lab_booking?characterEncoding=utf-8&serverTimezone=UTC + type: com.alibaba.druid.pool.DruidDataSource + + initialSize: 5 + minIdle: 5 + maxActive: 20 + maxWait: 60000 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + + filters: stat,wall,log4j + maxPoolPreparedStatementPerConnectionSize: 20 + useGlobalDataourceStat: true + connectionProperties: druid.stat.mergeSql=true:druid.stat.slowSqlMillis=500 + +