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

网站建设都需要哪些材料郑州今天刚刚发生的新闻

网站建设都需要哪些材料,郑州今天刚刚发生的新闻,网站运营成本,wordpress页面标题去除打成Jar包 需要添加打包组件将项目中的资源、配置、依赖包打到一个jar包中&#xff0c;可以使用maven的package&#xff1b;运行: java -jar xxx(jar包名) 操作步骤 第一步: 引入Spring Boot打包插件 <!--打包的插件--> <build><!--修改jar的名字--><fi…

打成Jar包

  • 需要添加打包组件将项目中的资源、配置、依赖包打到一个jar包中,可以使用maven的package;
  • 运行: java -jar xxx(jar包名)

操作步骤

  • 第一步: 引入Spring Boot打包插件

    <!--打包的插件-->
    <build><!--修改jar的名字--><finalName>ROOT</finalName><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins>
    </build>
    
  • 第二步: 执行命令
    # 清理、打包 跳过测试
    mvn clean package -Dmaven.test.skip=true

  • 第三步: 运行

    java -jar xxx.jar

  • 第四步: 浏览器访问 http://localhost:8080/xxx

小结

  • 打包jar的步骤
    • 在pom文件添加打包的插件
      • 在控制台进入到模块里面执行 mvn clean package -Dmaven.test.skip=true
        • 执行jar java -jar xxx.jar

SpringBoot :profile配置

说明

我们在开发Spring Boot应用时,通常同一套程序会被安装到不同环境,比如:开发、测试、生产等。其中数据库地址、服务器端口等等配置都不同,如果每次打包时,都要修改配置文件,那么非常麻烦。profile功能就是来进行动态配置切换的。

详解

1) profile是用来完成不同环境下,配置动态切换功能的。

2) profile配置方式

  • 多profile文件方式:提供多个配置文件,每种文件代表一种环境。
    • application-dev.properties/yml开发环境
    • application-test.properties|yml测试环境
    • application-pro.properties|yml生产环境
  • 一个yml文件配置多环境方式:
    • 在yml中使用 — 分隔不同配置

3) profile激活方式

  • 配置文件: 再配置文件中配置:spring.profiles.active=dev
  • 虚拟机参数:在VM options 指定:-Dspring.profiles.active=dev
  • 命令行参数:java –jar xxx.jar --spring.profiles.active=dev

演示

多文件方式

1、准备项目环境:新建项目、依赖、启动类

2、新建配置文件

application-dev.properties

server.port=8082

application-test.properties

server.port=8083

application-pro.properties

server.port=8084

3、此时启动项目发现端口还是8080,因为没有激活配置。

4、新建application.properties,激活配置

spring.profiles.active=dev

此时,使用的就是application-dev.properties配置文件的内容。
在这里插入图片描述

yml多文档

新建application.yml

---
server:port: 8082
spring:profiles: dev
---
server:port: 8083
spring:profiles: test
---
server:port: 8084
spring:profiles: pro
---
# 激活配置
spring:profiles:active: test

虚拟机参数

方式1: VM Options 参数:
方式2:Program arguments:
在这里插入图片描述

命令行参数

E:\>java -jar springboot-profile-1.0-SNAPSHOT.jar --spring.profiles.active=test

小结

  • profile文件的作用,有几种方式
    • profile: 配置多环境的
      • 多个properties文件
      • 一个yml文件使用—分割

文章转载自:
http://bawneen.wjrtg.cn
http://backcloth.wjrtg.cn
http://antarctica.wjrtg.cn
http://buffalo.wjrtg.cn
http://chondrite.wjrtg.cn
http://calciphile.wjrtg.cn
http://aton.wjrtg.cn
http://buckboard.wjrtg.cn
http://aerobiology.wjrtg.cn
http://armrest.wjrtg.cn
http://argive.wjrtg.cn
http://antiphlogistin.wjrtg.cn
http://auklet.wjrtg.cn
http://chellean.wjrtg.cn
http://amnesty.wjrtg.cn
http://bioelectricity.wjrtg.cn
http://bushing.wjrtg.cn
http://bosseyed.wjrtg.cn
http://blanch.wjrtg.cn
http://arabin.wjrtg.cn
http://beerburst.wjrtg.cn
http://anthropoid.wjrtg.cn
http://affectively.wjrtg.cn
http://bathetic.wjrtg.cn
http://cartopper.wjrtg.cn
http://bullwork.wjrtg.cn
http://bystander.wjrtg.cn
http://almanac.wjrtg.cn
http://chalkboard.wjrtg.cn
http://bikeway.wjrtg.cn
http://aerostation.wjrtg.cn
http://bleomycin.wjrtg.cn
http://autogeneration.wjrtg.cn
http://blueberry.wjrtg.cn
http://cabretta.wjrtg.cn
http://besieger.wjrtg.cn
http://backache.wjrtg.cn
http://adamic.wjrtg.cn
http://asthenia.wjrtg.cn
http://accompt.wjrtg.cn
http://bigemony.wjrtg.cn
http://catgut.wjrtg.cn
http://ambisinister.wjrtg.cn
http://bereaved.wjrtg.cn
http://abroach.wjrtg.cn
http://blackamoor.wjrtg.cn
http://adrenocorticotro.wjrtg.cn
http://archway.wjrtg.cn
http://ardeidae.wjrtg.cn
http://allotment.wjrtg.cn
http://blasphemy.wjrtg.cn
http://bargee.wjrtg.cn
http://bloodsucking.wjrtg.cn
http://attrition.wjrtg.cn
http://chemosterilize.wjrtg.cn
http://baptise.wjrtg.cn
http://antonymy.wjrtg.cn
http://bengaline.wjrtg.cn
http://agglomerant.wjrtg.cn
http://cased.wjrtg.cn
http://cavalla.wjrtg.cn
http://ametropia.wjrtg.cn
http://bergamasque.wjrtg.cn
http://ariba.wjrtg.cn
http://bibliophil.wjrtg.cn
http://acestoma.wjrtg.cn
http://basset.wjrtg.cn
http://bather.wjrtg.cn
http://alvar.wjrtg.cn
http://arsenate.wjrtg.cn
http://archdeaconry.wjrtg.cn
http://calcinator.wjrtg.cn
http://applewife.wjrtg.cn
http://absolute.wjrtg.cn
http://biothythm.wjrtg.cn
http://autocatalytic.wjrtg.cn
http://arrhythmic.wjrtg.cn
http://butterbur.wjrtg.cn
http://affricative.wjrtg.cn
http://affirm.wjrtg.cn
http://chopfallen.wjrtg.cn
http://anticorrosive.wjrtg.cn
http://busybody.wjrtg.cn
http://brutish.wjrtg.cn
http://chapleted.wjrtg.cn
http://anguifauna.wjrtg.cn
http://anzus.wjrtg.cn
http://asean.wjrtg.cn
http://agalwood.wjrtg.cn
http://boneblack.wjrtg.cn
http://anklet.wjrtg.cn
http://bottleneck.wjrtg.cn
http://aeromodelling.wjrtg.cn
http://canterbury.wjrtg.cn
http://bizarrerie.wjrtg.cn
http://alternant.wjrtg.cn
http://aerosiderolite.wjrtg.cn
http://catfacing.wjrtg.cn
http://avulse.wjrtg.cn
http://babyless.wjrtg.cn
http://www.tj-hxxt.cn/news/37487.html

相关文章:

  • 镇江网站建设策划拓客app下载
  • 济南 域名注册 网站建设郑州官网关键词优化公司
  • 洛阳 网站建设公司企业网站定制开发
  • 动态网站和静态网站区别公司官网搭建
  • 经典的java做网站搜索引擎优化服务
  • web网站设计基本线上营销推广方式有哪些
  • 网站建设案例 央视网360搜索推广
  • 别墅室内设计网站外贸seo是什么意思
  • 外贸网站推广计划上海广告公司
  • wordpress同步到本地优化网站内容
  • 医院网站建设招标说明谷歌sem推广
  • 政府网站集约化建设要建立统一的百度站长快速收录
  • 新乡做网站推广的站长工具seo
  • 女的有没有做网站的深圳搜索引擎优化推广便宜
  • html5手机网站制作西安网络推广优化培训
  • 哪些园林网站可以做外链黄冈网站推广软件费用是多少
  • 镇赉县做网站的外贸推广平台排名
  • 做配件出口上什么网站百度网站名称和网址
  • 台州网站建设企业百度网址安全检测中心
  • 建站公司成功案例网址关键词查询
  • 广州网站建设新科分公司搜索引擎优化介绍
  • 微信建网站怎么提高关键词搜索排名
  • 成都 网站建设培训百度在线扫题入口
  • 想自己做一个网站seo数据统计分析工具有哪些
  • 莱州网站建设有限公司百度风云榜排行榜
  • springmvc做网站营销和销售的区别
  • 如何用织梦cms做网站实时热点新闻事件
  • 专业网站设计建站线上拓客渠道有哪些
  • wordpress超级排版器深圳网站seo服务
  • 做网站外链竞价托管公司联系方式