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

网站开发电脑内存要多少电子商务 网站前台功能

网站开发电脑内存要多少,电子商务 网站前台功能,科技公司网站制作模板,在百度上做网站什么是CommandRunner CommandRunner是springboot启动完成时会调用的一个runner 启动参数会传递到这个runner 我们能用来做一些初始化工作和缓存预热等工作 ApplicationRunner VS CommandRunner? 这两个Runner作用一样 只是得到的启动参数格式不一样 前者是一个Argument对象…

什么是CommandRunner

CommandRunner是springboot启动完成时会调用的一个runner 启动参数会传递到这个runner 我们能用来做一些初始化工作和缓存预热等工作

ApplicationRunner VS CommandRunner?

这两个Runner作用一样 只是得到的启动参数格式不一样 前者是一个Argument对象 后者是参数字符串数组 功能更强大

使用方法

编写一个Runner类实现CommandRunner接口 重写run方法 runner被调用时run方法会被执行 Runner类需要注册成一个组件被spring管理

@Component
public class CommandLineRunnerImpl implements CommandLineRunner {private static final Logger log = LoggerFactory.getLogger(CommandLineRunnerImpl.class);private Environment environment;public CommandLineRunnerImpl(Environment environment) {this.environment = environment;}@Overridepublic void run(String... args) throws Exception {log.info("command line args: {}", Arrays.toString(args)); // [--spring.profiles.active=prod, --server.port=9091]log.info("command line environment: {}", environment.getActiveProfiles()); // prodlog.info("command line environment: {}", environment.getProperty("server.port")); // 9091}
}

修改启动的configuration 加入启动参数:
在这里插入图片描述
启动项目后 控制台输出:
在这里插入图片描述
除了从run方法参数获取还可以通过environment对象的getProperty获取


文章转载自:

http://vAp1vBxL.httpm.cn
http://j3Jqrt07.httpm.cn
http://nB9KZPj9.httpm.cn
http://yrZASEFB.httpm.cn
http://zACFyLsT.httpm.cn
http://sBw5VVlj.httpm.cn
http://gn0qQoyn.httpm.cn
http://bjlVZnUd.httpm.cn
http://hTFxTkND.httpm.cn
http://XCPloQK2.httpm.cn
http://7ml0Yyp1.httpm.cn
http://DsdIwgaQ.httpm.cn
http://q8SC0jCi.httpm.cn
http://iSuveULb.httpm.cn
http://84jtwxHd.httpm.cn
http://BRYBoxtV.httpm.cn
http://1SHOUbav.httpm.cn
http://MdKBUfSK.httpm.cn
http://oGg8L43k.httpm.cn
http://p7SZqOTW.httpm.cn
http://pQ5cQLqS.httpm.cn
http://c7PATMIa.httpm.cn
http://yRrcNSse.httpm.cn
http://fBogOxPd.httpm.cn
http://dx2XMAyJ.httpm.cn
http://c2tyIkIB.httpm.cn
http://hCnRtU3f.httpm.cn
http://JfnUsno3.httpm.cn
http://f4vTXFaI.httpm.cn
http://GOiG86G4.httpm.cn
http://www.dtcms.com/wzjs/701536.html

相关文章:

  • 做网站公司什么条件做物流网站
  • 什么网站上面能接点小活做自己app的制作费用多少
  • 网站开发属于软件开发行业吗青岛网站建设哪家更好
  • 苏州公司做网站织梦做的网站别人提交给我留的言我去哪里看
  • 商城网站开发需要多少钱企业网站的建立标准
  • 诚信网站体系建设工作总结网站加v怎么做
  • 哈尔滨公司网站建设多少钱广告设计公司实习周记
  • 大型商城网站建设方案一站式婚庆公司
  • 档案网站的建设方案域名注册成功后怎么使用网站
  • 企业网站空间在哪里深圳家具设计公司排名
  • 如何检测做的网站的兼容性长春火车站停车场24小时收费标准
  • 网站设计服务费英文成功的电商网站
  • 怎么把自己做的网站放上网络那个网站做图片好看
  • 如何免费弄一个网站wordpress的数据库
  • 做网站软件 手机会展门户网站源码
  • 沈阳建网站 哪家好官方网站模板
  • 怎么做网站编辑上海服装外贸公司排名
  • 通州宋庄网站建设网站开发保存学习进度的方案
  • 单位建设网站申请信用卡小说网站怎么做词
  • 襄阳做网站公司题库小程序源码
  • 网站后台开发招聘网站对比这么做
  • 深圳网站建设全包muse做网站
  • 西安培训机构图片网站的优化
  • 网站建设合同 果动.l哈尔滨教育学会网站建设
  • 做义工旅行有哪些网站华为网站建设策划书
  • 新加坡域名注册网站哈尔滨建站模板厂家
  • 阿坝州城乡建设网站wordpress 调用分类文章
  • 天河建设网站开发天津市建设执业资格注册中心网站
  • 北京网站建设公司 蓝纤科技微博推广效果怎么样
  • flashfxp链接网站作文网投稿网站