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

医疗器械网站建设做推广的注册什么公司好

医疗器械网站建设,做推广的注册什么公司好,如何做推广网站,电商网站建设基础教案文章目录 响应头添加版本号获取版本号添加响应处理器请求结果 打包项目后缀添加版本号和时间实现打包结果 响应头添加版本号 获取版本号 在 pom.xml 中#xff0c;在 project.version 下定义版本号 在 application.yml 获取 pom.xml 中 project.version 中的信息 添加响应处… 文章目录 响应头添加版本号获取版本号添加响应处理器请求结果 打包项目后缀添加版本号和时间实现打包结果 响应头添加版本号 获取版本号 在 pom.xml 中在 project.version 下定义版本号 在 application.yml 获取 pom.xml 中 project.version 中的信息 添加响应处理器 完整代码如下 通过 Value(${project.version}) 获取 application.yml 中的 project.version并写入响应头 import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServerHttpResponse; import org.springframework.http.server.ServletServerHttpResponse; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;ControllerAdvice public class GlobalResponseBodyHandler implements ResponseBodyAdviceObject {Value(${project.version})private String version;Overridepublic boolean supports(MethodParameter returnType, Class? extends HttpMessageConverter? converterType) {return true;}Overridepublic Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, Class? extends HttpMessageConverter? selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {ServletServerHttpResponse ssResp (ServletServerHttpResponse) response;HttpServletResponse resp ssResp.getServletResponse();resp.setHeader(version, StringUtils.isNotEmpty(version) ? version : unknown);return body;} } 请求结果 打包项目后缀添加版本号和时间 实现 在 pom.xml 中的 build 标签写入以下代码 build!--打包后生成文件名--finalName${project.artifactId}-${project.version}_${current.time}/finalNamepluginsplugingroupIdorg.springframework.boot/groupIdartifactIdspring-boot-maven-plugin/artifactIdconfigurationmainClasscom.chh.api.ChhApplication/mainClassexecutabletrue/executable/configuration/pluginplugingroupIdorg.codehaus.mojo/groupIdartifactIdbuild-helper-maven-plugin/artifactIdversion3.0.0/versionexecutionsexecutionidtimestamp-property/idgoalsgoaltimestamp-property/goal/goals/execution/executionsconfigurationnamecurrent.time/namepatternyyyyMMdd-HHmmss/patterntimeZoneGMT8/timeZone/configuration/plugin!-- 打包跳过测试--plugingroupIdorg.apache.maven.plugins/groupIdartifactIdmaven-surefire-plugin/artifactIdconfigurationskiptrue/skip/configuration/plugin/plugins /build打包结果
http://www.zqtcl.cn/news/351347/

相关文章:

  • 网站后台重置密码怎么做360网站怎么做网址链接
  • 广告网站建设及推广网站建设怎样推广
  • 做网站使网页不居中滁州注册公司流程和费用
  • 做网站广告经营者个性定制网站
  • 网站开发 北京外包公司软件公司网站建设
  • 网络认证入口seo免费诊断
  • 十大知名博客网站郑州企业建站公司定制
  • 视频网站如何做引流网站首页 关键词
  • 建设机械网站精英大港做网站
  • 潜山网站建设公司哪里有wordpress相册投票插件
  • 网站建设制作过程网站添加支付功能
  • 网站制作字体即墨公司做网站
  • vue 做pc网站可以吗哪个网站买域名便宜
  • 做销售网站那家好金华住房与城乡建设部网站
  • apple私人免费网站怎么下载无锡网站建设技术
  • 移动应用网站开发阶段作业信息型网站有哪些
  • 监控直播网站开发网站建设与管理总结
  • 青岛城阳网站设计免费网站成品
  • 做服装外贸的网站ghost wordpress
  • 建设银行的网站为什么这么卡网页设计用啥软件
  • 电子商务 网站开发南阳网网站建设
  • 中小型企业网络拓扑图及配置株洲seo网站推广
  • 中国镇江网站如何搭建自己的网址
  • wordpress 自动广告seo搜索引擎优化原理
  • 区块链网站用vue.js做怎么样长春站建筑
  • 集团公司门户网站建设adsl做网站
  • 山东建设监理协会官方网站茂名建站公司模板
  • 烟台做网站案例创业网站推广怎么做
  • php项目网站建设方案书专做药材的网站有哪些
  • 网站表单模板营销型网站建设的5大技巧