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

用scala做网站百度投放广告流程

用scala做网站,百度投放广告流程,怎么更改自动目录的格式,有没有免费资源原文网址#xff1a;SpringBoot--yml配置文件的时间/大小的单位转换_IT利刃出鞘的博客-CSDN博客 简介 说明 本文介绍SpringBoot的yml#xff08;properties#xff09;配置文件的时间/大小的单位转换。 概述 SpringBoot可以将yml中的配置绑定到一个Java类的字段#x…原文网址SpringBoot--yml配置文件的时间/大小的单位转换_IT利刃出鞘的博客-CSDN博客 简介 说明 本文介绍SpringBoot的ymlproperties配置文件的时间/大小的单位转换。 概述 SpringBoot可以将yml中的配置绑定到一个Java类的字段而且支持单位的转换。以时间为例yml中指定为2m则可以用Duration来接收这个字段接收到的字段值为3分钟。 注意 本处的单位转换支持配置放到一个类中也支持Value等。 时间的转换 概述 Spring 使用 java.time.Duration 类代表时间大小以下场景适用 除非指定 DurationUnit 否则一个 long 代表的时间为毫秒。ISO-8601 标准格式 java.time.Duration 的实现就是参照此标准你也可以使用以下支持的单位用大写也可以 ns - 纳秒us - 微秒ms - 毫秒s - 秒m - 分h - 时d - 天 示例 application.yml custom:monitor:name: myMonitorinterval: 3m 实体类 package com.knife.config;import lombok.Data;import java.time.Duration;Data public class MonitorProperty {private String name;private Duration interval; }配置类 package com.knife.config;import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;Configuration public class MonitorConfig {ConfigurationProperties(prefix custom.monitor)Beanpublic MonitorProperty monitorProperty() {return new MonitorProperty();} }测试类 package com.knife.controller;import com.knife.config.MonitorProperty; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController;RestController public class HelloController {Autowiredprivate MonitorProperty monitorProperty;GetMapping(/test)public String test() {return test success;} }测试 打个断点然后请求 工具类实例 SpringBoot的转换时间的工具类是DurationStyleorg.springframework.core.convert.support包。 示例 import org.springframework.core.convert.support.DurationStyle; import java.time.Duration;public class MyApp {public static void main(String[] args) {String durationString 3m;Duration duration DurationStyle.SIMPLE.parse(durationString);System.out.println(duration); // 输出 PT3M (3 minutes)} }大小的转换 上边是文章部分内容为便于维护全文已转移到此网址SpringBoot-yml配置文件的时间/大小的单位转换 - 自学精灵
http://www.dnsts.com.cn/news/259677.html

相关文章:

  • 罗湖商城网站设计制作东莞常平天气
  • 重庆网站制作技术dede旅游网站源码 多城市
  • 坪山企业网站建设自适应网站建设
  • 如何批量建站去年做哪些网站能致富
  • 桂林做手机网站wordpress 主题 破解
  • 做it行业招标网站有哪些seo诊断工具有哪些
  • 建设网站平台的章程无锡企业网站建设报价
  • 广州天与地网站建设上海线上引流推广
  • 多种东莞微信网站建设房地产市场现状
  • 如何搭建网站赚钱需要推广的app在哪里找
  • 怎么去掉网站首页尾缀微信如何制作一个网页
  • 开发app和做网站小城镇建设的网站中的主要观点
  • 做设计需要知道的几个网站吗北京工商注册信息查询
  • 摄影做网站号卡分销系统
  • 佛山网站建设专业交互设计网站案例
  • 公司支付网站建设费进什么费用德州网站建设 绮畅
  • 怎么提升网站的流量新公司名字大全参考
  • 怎么在网站上投放广告工业园区网站建设
  • 企业门户网站建设信息郑州最新防疫进展
  • 网站前置审批证书做网站好比做房子
  • 什么语言做网站快分销平台网站建设
  • saas 做网站wordpress可视编辑
  • 做旅游攻略的网站好网站app开发计划书
  • 新网 如何建设网站广州网站seo营销模板
  • 网站建设规划书费用预算我想做个网站怎么做
  • 手机软件制作网站微网站建设网络
  • 广州敏城建设工程有限公司网站网站logo怎么设置
  • 如何建立自己的摄影网站南京列表网免费发布信息
  • 怎样做网站 网页长沙网络推广袁飞seo
  • 文明网站建设温州免费做网站