首页 > 编程语言 > 详细

SpringBoot中的常用配置

时间:2017-06-23 21:53:43      阅读:449      评论:0      收藏:0      [点我收藏+]

一 . 关于在application.properties文件中的一些常见配置

    1.server.port=8888   :表示配置端口

    2.server.context-path  表示自定义上下文路径

    3.server.tomcat.uri-encoding = UTF-8        表示用于解码URI的字符编码。

    4.spring.http.encoding.charset = UTF-8 #HTTP请求和响应的字符集。如果未明确设置,则添加到“Content-Type”头。

    5.启用健康检查,首先必须先要添加支持的jar包 

      配置在maven项目下的pom.xml文件中

    <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>   

    6.#关闭actutor的安全认证
    7.#http://localhost:8888/sb/health 查看springboot健康状况是否良好
    8.#http://localhost:8888/sb/beans 类似于struts<s:debug>
    9.#http://localhost:8888/sb/dump dump出线程和内存使用情况
    10.#http://localhost:8888/sb/env java和springboot的环境变量
    11.management.security.enabled=false
    12.#启动url shutdown
      endpoints.shutdown.enabled=true

SpringBoot中的常用配置

原文:http://www.cnblogs.com/xushirong/p/7071695.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!