zoukankan      html  css  js  c++  java
  • SpringBoot中的常用配置

    一 . 关于在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

  • 相关阅读:
    HDU 1098 Ignatius's puzzle 也不大懂
    HDU 1099 Lottery
    图算法-Prime
    并查集
    CSS笔记2
    css笔记1
    HDU 5019 Revenge of GCD
    POJ 2255 Tree Recovery
    判断两条线段是否相交
    PAT 数列求和-加强版   (20分)(简单模拟)
  • 原文地址:https://www.cnblogs.com/xushirong/p/7071695.html
Copyright © 2011-2022 走看看