当前位置: 首页 > news >正文

网站个人中心页面设计做网站到a5卖站赚钱

网站个人中心页面设计,做网站到a5卖站赚钱,免费小程序制作网站,做的网站没流量多环境配置demo代码#xff1a;点击查看LearnSpringBoot02 点击查看更多的SpringBoot教程 方式一、多个properties文件配置 注意#xff1a;创建properties文件,命名规则#xff1a;application-#xff08;环境名称#xff09; 示例#xff1a;application-dev.proper…多环境配置demo代码点击查看LearnSpringBoot02 点击查看更多的SpringBoot教程 方式一、多个properties文件配置 注意创建properties文件,命名规则application-环境名称 示例application-dev.properties 在resource里创建application-dev.properties文件 在resource里创建application-product.properties文件 application.properties文件里切换环境配置 1、启动dev环境输出的日志 在浏览器访问http://localhost:8061/hello效果图 2、启动prdouct环境输出的日志 在浏览器访问http://localhost:8090/hello效果图 方式二、yml文件配置方式 在resource里创建application.yml文件 注意如果使用这里配置端口运行项目时需要将 application.properties 文件里的端口配置注释掉 1、启动dev环境输出的日志 在浏览器访问http://localhost:8991/hello效果图 2、启动prdouct环境输出的日志 在浏览器访问http://localhost:8992/hello效果图 pom.xml代码 ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersionparentgroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-parent/artifactIdversion3.1.1/versionrelativePath/ !-- lookup parent from repository --/parentgroupIdcom.example.springconfig/groupIdartifactIdLearnSpringBoot02/artifactIdversion0.0.1-SNAPSHOT/versionnameLearnSpringBoot02/namedescriptionDemo project for Spring Boot Config/descriptionpropertiesjava.version17/java.version/propertiesdependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-test/artifactIdscopetest/scope/dependency!-- JSR303数据校验--dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-validation/artifactId/dependency!--https://docs.spring.io/spring-boot/docs/3.1.1/reference/html/configuration-metadata.html#appendix.configuration-metadata.annotation-processor --dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-configuration-processor/artifactIdoptionaltrue/optional/dependency/dependenciesbuildpluginsplugingroupIdorg.springframework.boot/groupIdartifactIdspring-boot-maven-plugin/artifactId/plugin/plugins/build/project application.yml代码 server:port: 8990 spring:profiles:active: product --- server:port: 8991 spring:config:activate:on-profile: dev --- server:port: 8992 spring:config:activate:on-profile: product# 注意如果使用这里配置端口需要将 application.properties 文件里的端口配置注释掉#person: # lastName: Test # age: 20 # boss: false # birth: 2018/12/12 # maps: {k1: v1, k2: 12} # lists: # - java # - android # - ios # - python # # dog: # name: dahuang # age: 6HelloWorldControl.java代码 package com.example.springconfig.controller;import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController;RestController public class HelloWorldControl {RequestMapping(/hello)public String hello(){return hello world RestController;}//这里测试业务逻辑需要获取配置文件中的某个值 使用 Value 读取配置文件值Value(${person.lastName})private String name;RequestMapping(/sayhello)public String sayHello(){return hello name;} }
http://www.hkea.cn/news/14314875/

相关文章:

  • 蚌埠城乡建设 局网站wordpress ftp免密码破解
  • 石家庄手机网站建设网站快速排名互点软件
  • 物流建设网站总结深圳seo优化信
  • 音乐网站开发需求做公益网站的原因
  • 江门网站建设优化wordpress制作数据排行榜
  • 公司的网站建设是什么部门法律垂直问答网站怎样做
  • 男女做羞羞漫画网站提供网站设计方案公司
  • 如何建立网站空间肇庆市公共资源交易中心
  • 南通外贸网站推广软件下载网站如何履行安全管理义务确保提供的软件不含恶意程序
  • 网站建设流程哪家好石家庄的网站开发公司
  • 商城网站方案wordpress使用百度统计
  • 网站建设有什么作用mk厂手表网站
  • 万户做网站怎么样宁城网站建设公司
  • 外贸网站制作需求自己创建一个网站需要多少钱
  • wordpress外贸网站建设c2c模式的概念
  • 网站数据怎么备份网上做国外兼职网站
  • 大连网站建设讯息零基础学软件开发难吗
  • 企业网站类型有哪些wordpress页面自由布局
  • 我的世界做mc壁纸的网站郑州航空港建设局网站
  • 网页设计网站制作公司专业的网页设计服务
  • 哪里专业做网站海外精品网站建设
  • 人事代理网站建设企业信息港网站建没
  • 一个好的网站有什么标准济南高新区建设局网站
  • 检测网站是否做了301wordpress 循环菜单
  • 建设工程学部研究生培养网站公司注册资金实缴政策最新
  • 网站备案信息代码淘宝客wordpress想
  • 通过服务推广网站南宁网站优化
  • 上海网站建设的价格低资源共享网站建设
  • 游戏网站开发有限公司苏州战斧网络科技有限公司
  • 大丰住房和城乡建设局网站小吃加盟网站大全