Skip to content

Commit 2da218a

Browse files
committed
res
1 parent 7f4f956 commit 2da218a

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
*.iml
3-
node_modules
3+
node_modules
4+
target

application/pom.xml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

12+
<description>小莫的APP</description>
13+
1214
<artifactId>application</artifactId>
1315
<dependencies>
1416
<dependency>

application/src/main/java/info/xiaomo/application/ApplicationMain.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ public Docket createRestApi() {
7070
return new Docket(DocumentationType.SWAGGER_2)
7171
.apiInfo(apiInfo())
7272
.select()
73-
.apis(RequestHandlerSelectors.basePackage("info.xiaomo.xiaomoApp"))
73+
.apis(RequestHandlerSelectors.basePackage("info.xiaomo.application"))
7474
.paths(PathSelectors.any())
7575
.build();
7676
}
7777

7878
private ApiInfo apiInfo() {
7979
return new ApiInfoBuilder()
8080
.title("Spring Boot中使用Swagger2构建RESTful APIs")
81-
.description("api根地址:http://xiaomoApp.xiaomo.info:8080/")
82-
.termsOfServiceUrl("http://blog.xiaomo.info/")
81+
.description("api根地址:http://api.xiaomo.info:8080/")
82+
.termsOfServiceUrl("https://xiaomo.info/")
8383
.contact("小莫")
8484
.version("1.0")
8585
.build();

application/src/main/java/info/xiaomo/application/controller/UserController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public Result register(@PathVariable("email") String email, @PathVariable("passw
118118
@ApiImplicitParam(name = "email", value = "邮箱", required = true, dataType = "String", paramType = "path"),
119119
@ApiImplicitParam(name = "password", value = "密码", required = true, dataType = "String", paramType = "path")
120120
})
121-
@RequestMapping(value = "login/{email}/{password}", method = RequestMethod.POST)
121+
@RequestMapping(value = "login/{email}/{password}", method = RequestMethod.GET)
122122
public Result login(@PathVariable("email") String email, @PathVariable("password") String password) {
123123
UserModel userModel = service.findUserByEmail(email);
124124
//找不到用户

application/src/main/resources/config/application.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
1212
spring.jackson.time-zone=GMT+8
1313
#jpa
1414
spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect
15-
spring.jpa.hibernate.ddl-auto=create-drop
15+
spring.jpa.hibernate.ddl-auto=update
1616
spring.jpa.show-sql=true
1717

1818

0 commit comments

Comments
 (0)