Skip to content

Commit

Permalink
1.springboot2.x工程增加注释说明
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwujing committed Apr 12, 2019
1 parent 70fff38 commit 4292576
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
3 changes: 3 additions & 0 deletions springboot-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.pancm.web;
package com.pancm.handler;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
Expand Down
5 changes: 5 additions & 0 deletions springboot-2/src/main/java/com/pancm/web/HelloRouter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.pancm.web;

import com.pancm.handler.HelloHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
Expand All @@ -13,6 +14,10 @@
* @Title: HelloRouter
* @Description:请求路由处理类
主要 提供接口调用,类似 @RequestMapping 注解,可以理解为mvc中的controller
启动程序之后,在浏览器输入:http://localhost:8280/webflux/hello 即可查看返回信息
在浏览器输入:http://localhost:8280/actuator 即可查看程序的相关信息
springboot2.x的配置说明:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide
* @Version:1.0.0
* @Since: jdk1.8
* @author pancm
Expand Down
15 changes: 9 additions & 6 deletions springboot-2/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
server:
port: 8280
port: 8280


spring:
application:
name: springboot2


management:
security:
enabled: false #关掉安全认证
port: 8888 #管理端口
context-path: /monitor #actuator的访问路径
endpoint:
shutdown:
enabled: true




0 comments on commit 4292576

Please sign in to comment.