Skip to content

Commit 305b7a5

Browse files
committed
spring boot restful api
1 parent 9703b87 commit 305b7a5

26 files changed

+42
-768
lines changed

.gitignore

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,2 @@
1-
# Compiled class file
2-
*.class
3-
4-
# Log file
5-
*.log
6-
7-
# BlueJ files
8-
*.ctxt
9-
10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
12-
13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
21-
22-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23-
hs_err_pid*
24-
.idea/
25-
.mvn/wrapper/maven-wrapper.properties
26-
spring-boot-restful-api.iml
1+
target
2+
.idea

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ properties配置文件 application.properties
5353

5454
### 问题建议
5555

56-
- 联系我的邮箱:ilovey_hwy@163.com
56+
- 联系我的邮箱:sapphire.php@gmail.com

mvnw

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,6 @@ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
220220

221221
exec "$JAVACMD" \
222222
$MAVEN_OPTS \
223-
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
223+
-classpath "$MAVEN_PROJECTBASEDIR/.m2/wrapper/maven-wrapper.jar" \
224224
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
225225
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@
9090
</dependency>
9191
<!--mapper-->
9292
<!--<dependency>-->
93-
<!--<groupId>tk.mybatis</groupId>-->
94-
<!--<artifactId>mapper-spring-boot-starter</artifactId>-->
95-
<!--<version>2.0.3</version>-->
93+
<!--<groupId>tk.mybatis</groupId>-->
94+
<!--<artifactId>mapper-spring-boot-starter</artifactId>-->
95+
<!--<version>2.0.3</version>-->
9696
<!--</dependency>-->
9797
<dependency>
9898
<groupId>tk.mybatis</groupId>

spring-boot-restful-api.iml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4" />

src/main/resources/application-dev.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
############################################################
22
#
3-
# 配置数据源文件 使用阿里的 druid 连接池
43
#
54
############################################################
65
spring.datasource.url=jdbc:mysql://localhost:3306/sg
76
spring.datasource.username=root
8-
spring.datasource.password=
7+
spring.datasource.password=ba199035
98
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
109
spring.datasource.druid.initial-size=1
1110
spring.datasource.druid.min-idle=1
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
# \u751F\u4EA7\u73AF\u5883\u914D\u7F6E
1+
############################################################
2+
#
3+
#
4+
############################################################
5+
spring.datasource.url=jdbc:mysql://localhost:3306/sg
6+
spring.datasource.username=root
7+
spring.datasource.password=ba199035
8+
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
9+
spring.datasource.druid.initial-size=1
10+
spring.datasource.druid.min-idle=1
11+
spring.datasource.druid.max-active=20
12+
spring.datasource.druid.test-on-borrow=true
13+
spring.datasource.druid.stat-view-servlet.allow=true
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
# \u6D4B\u8BD5\u73AF\u5883\u914D\u7F6E
1+
############################################################
2+
#
3+
#
4+
############################################################
5+
spring.datasource.url=jdbc:mysql://localhost:3306/sg
6+
spring.datasource.username=root
7+
spring.datasource.password=ba199035
8+
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
9+
spring.datasource.druid.initial-size=1
10+
spring.datasource.druid.min-idle=1
11+
spring.datasource.druid.max-active=20
12+
spring.datasource.druid.test-on-borrow=true
13+
spring.datasource.druid.stat-view-servlet.allow=true

src/main/resources/application.properties

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
spring.profiles.active=dev
2-
# 所有环境通用的配置,放在这里
32

4-
# 404 交给异常处理器处理
53
spring.mvc.throw-exception-if-no-handler-found=true
64
spring.resources.add-mappings=false
75

@@ -15,7 +13,6 @@ mybatis.type-aliases-package=com.yi.project.model
1513
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
1614

1715
#mapper
18-
#mappers 多个接口时逗号隔开
1916
mapper.mappers=com.yi.project.core.GeneralMapper
2017
mapper.not-empty=false
2118
mapper.identity=MYSQL
@@ -24,4 +21,8 @@ mapper.identity=MYSQL
2421
pagehelper.helperDialect=mysql
2522
pagehelper.reasonable=true
2623
pagehelper.supportMethodsArguments=true
27-
pagehelper.params=count=countSql
24+
pagehelper.params=count=countSql
25+
26+
27+
#http server
28+
server.port=8004

src/main/resources/banner.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// (| ^_^ |) //
66
// O\ = /O //
77
// ____/`---'\____ //
8-
// .' \\| |// `. //
8+
// .' \\| x |// `. //
99
// / \\||| : |||// \ //
1010
// / _||||| -:- |||||- \ //
1111
// | | \\\ - /// | | //

0 commit comments

Comments
 (0)