From 11daf8f10c941cfcd12593ad350fc60388b498dc Mon Sep 17 00:00:00 2001 From: WorldOneTwo <2197248717> Date: Tue, 12 Apr 2022 22:32:13 +0800 Subject: [PATCH] =?UTF-8?q?master=E7=AC=AC=E4=B8=83=E6=AC=A1=E6=8F=90?= =?UTF-8?q?=E4=BA=A4-=E5=88=9D=E6=AD=A5=E5=BB=BA=E7=AB=8B=E6=A1=86?= =?UTF-8?q?=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 43 ++++++++++++++++++- .../HealthMonitoringSystemApplication.java | 2 +- .../example/controller/UserController.java | 15 +++++++ .../resources/application-personal.properties | 5 +++ .../resources/application-public.properties | 5 +++ src/main/resources/application.properties | 3 ++ .../com/example/mapper/UserMapper.xml | 8 ++++ 7 files changed, 79 insertions(+), 2 deletions(-) rename src/main/java/com/example/{healthmonitoringsystem => }/HealthMonitoringSystemApplication.java (88%) create mode 100644 src/main/java/com/example/controller/UserController.java create mode 100644 src/main/resources/application-personal.properties create mode 100644 src/main/resources/application-public.properties create mode 100644 src/main/resources/com/example/mapper/UserMapper.xml diff --git a/pom.xml b/pom.xml index a542977..a146dca 100644 --- a/pom.xml +++ b/pom.xml @@ -8,15 +8,25 @@ 2.6.6 + com.example HealthMonitoringSystem 0.0.1-SNAPSHOT + HealthMonitoringSystem - HealthMonitoringSystem + 健康监测系统 + 1.8 + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 1.3.1 + + org.springframework.boot spring-boot-starter-web @@ -27,11 +37,31 @@ mysql-connector-java runtime + + + + com.alibaba + druid + 1.0.29 + + org.springframework.boot spring-boot-starter-test test + + + io.springfox + springfox-swagger2 + 2.9.2 + + + + com.google.guava + guava + 20.0 + @@ -39,6 +69,17 @@ org.springframework.boot spring-boot-maven-plugin + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + diff --git a/src/main/java/com/example/healthmonitoringsystem/HealthMonitoringSystemApplication.java b/src/main/java/com/example/HealthMonitoringSystemApplication.java similarity index 88% rename from src/main/java/com/example/healthmonitoringsystem/HealthMonitoringSystemApplication.java rename to src/main/java/com/example/HealthMonitoringSystemApplication.java index a9f7179..79b4004 100644 --- a/src/main/java/com/example/healthmonitoringsystem/HealthMonitoringSystemApplication.java +++ b/src/main/java/com/example/HealthMonitoringSystemApplication.java @@ -1,4 +1,4 @@ -package com.example.healthmonitoringsystem; +package com.example; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/java/com/example/controller/UserController.java b/src/main/java/com/example/controller/UserController.java new file mode 100644 index 0000000..4842ef1 --- /dev/null +++ b/src/main/java/com/example/controller/UserController.java @@ -0,0 +1,15 @@ +package com.example.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class UserController +{ + + @RequestMapping("/hello") + public String hello() + { + return "hello"; + } +} diff --git a/src/main/resources/application-personal.properties b/src/main/resources/application-personal.properties new file mode 100644 index 0000000..d0db39e --- /dev/null +++ b/src/main/resources/application-personal.properties @@ -0,0 +1,5 @@ +spring.datasource.url=jdbc:mysql:///mybatis?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai +spring.datasource.username=root +spring.datasource.password=52118259541xx + +server.port=8080 \ No newline at end of file diff --git a/src/main/resources/application-public.properties b/src/main/resources/application-public.properties new file mode 100644 index 0000000..a357278 --- /dev/null +++ b/src/main/resources/application-public.properties @@ -0,0 +1,5 @@ +spring.datasource.url=jdbc:mysql:///mybatis?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai +spring.datasource.username= +spring.datasource.password= + +server.port=8080 \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 8b13789..e2cf528 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1,4 @@ +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.mvc.pathmatch.matching-strategy=ant_path_matcher +spring.profiles.active=personal diff --git a/src/main/resources/com/example/mapper/UserMapper.xml b/src/main/resources/com/example/mapper/UserMapper.xml new file mode 100644 index 0000000..542abc1 --- /dev/null +++ b/src/main/resources/com/example/mapper/UserMapper.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file -- GitLab