zoukankan      html  css  js  c++  java
  • Spring Boot 使用IntelliJ IDEA创建一个web开发实例(五)

    使用application.ym进行多环境配置

    1.配置激活选项

    spring:
         profiles:
            active: dev   

    2.在配置文件添加若干个英文状态下的短横线即可区分

    spring:
      profiles:
        active: dev
      server:
        port : 8080
        servlet:
          context-path: /demo
    
      name : hello demo
    ---
    spring:
      profiles: dev
    server:
      port : 8082
      servlet:
        context-path: /demo2
    name : hello demo dev
    ---
    spring:
      profiles: pro
    server:
      port : 8083
      servlet:
        context-path: /demo3
    name : hello demo pro
    ---
    spring:
      profiles: test
    server:
      port : 8084
      servlet:
        context-path: /demo4
    name : hello demo test

     运行测试

    修改激活配置

    spring:
         profiles:
            active: test

    测试

  • 相关阅读:
    记录输出时间
    ***灵感或者没想到的思想
    Managing Difficulties
    4.20
    单调队列
    背包
    线性DP
    可持久化数据结构
    平衡树
    点分治
  • 原文地址:https://www.cnblogs.com/zsg88/p/9163345.html
Copyright © 2011-2022 走看看