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

中国建设网站的证件怎么查安徽省芜湖建设定额网站

中国建设网站的证件怎么查,安徽省芜湖建设定额网站,wordpress 移动主题 crystal,南宁网站开发一、基础 官方文档地址#xff1a;Spring Boot 注#xff1a;以下部分例子 有些用到 .properties 方式#xff0c;有些用 .yml方式#xff0c;两者可自行学习#xff0c;这里部分是为了省空间而写 .properties 方式。 1、泛谈 #xff08;1#xff09;优势 快速构建…一、基础 官方文档地址Spring Boot 注以下部分例子 有些用到 .properties 方式有些用 .yml方式两者可自行学习这里部分是为了省空间而写 .properties 方式。 1、泛谈 1优势 快速构建去除传统 spring xml配置内嵌web容器并提供监控/健康检查starters 自动依赖包大量自动配置“习惯大于配置” 2springboot项目创建 创建 maven项目引入 相应的 starters继承parent 引入web并加入 maven 插件创建 启动类SpringBootApplication SpringApplication.run() 注如果不想继承 parent也可以 2、属性配置 1获取方式 Value 方式 或者 Environment  // Value(${name:default}) 双引号后面可以加 默认值 Value(${name}) private String name;等同于下面不过下面这种如果配置文件中不存在值的时候启动不会报错而上面启动都不行 Autowired private Environment env; env.getProperty(name); ConfigurationProperties 方式 // 其实基于 EnableConfigurationProperties 来完成 Component ConfigurationProperties(prefix lin) Data public class LinProperties {private String name;private Integer age;private String email;private Boolean boss;private Date birth;private MapString, String system; // private UserSystem system;private ListString work; } 2数据类型 简单类型 lin:name: 小林boss: falsebirth: 1995/02/17email: 928232596qq.com 对象 Map类型 lin:system:username: linzhuzaipassword: 123456#也可以写成 system: {username: linzhuzai, password: 123456}#如果是 properties文件还能写成 lin.system[username]linzhuzai 或者 lin.system.usernamelinzhuzai# 如果获取方式是 Value(#{${lin.system}}) lin:system: {MY0003: MY0001}List Set类型 lin:work:- 佛山- 广州#也可以写成 work: [佛山,广州]#如果是 properties文件还能写成 lin.work[0]佛山 3引入文件 导入xml 文件 ImportResource(locations {classpath:beans.xml}) SpringBootApplication public class SpringbootApplication {public static void main(String[] args){SpringApplication.run(SpringbootApplication.class, args);} } 导入 properties 文件 PropertySource(value {classpath:lin.properties}) Component ConfigurationProperties(prefix lin) public class LinProperties { } 4多环境配置 如有多个 yml文件配置application.yml  application-dev.yml  application-prod.yml yml 文件spring.profiles.activedev启动命令行--spring.profiles.activedev虚拟机参数-Dspring.profiles.activedev 5随机值 引用值 随机值利用 random如  age: ${random.int}引用值可引用已配置的值如 name: ${lin.name} 6配置目录优先级 –file: ./config/–file: ./–classpath: /config/–classpath: / 7配置优先级 命令行参数配置系统环境变量bootstrap.properties/bootstrap.yml优先级高于 application它是 spring-cloud的jar包外内的 application-{profile}.properties / application-{profile}.ymljar包外内的 application.properties / application.yml 注① 命令行系统环境bootstrapapplication-{profile}application② propertiesyamlyml③ jar包外 优先于 包内 二、SpringBootApplication 1、SpringBootConfiguration等同于 Configuration 2、EnableAutoConfiguration 1 3、ComponentScan 三、原理 1、Import 原理 1Import可用来导入 普通类或者配置类这样类本身和类中配置的 Bean都可被 spring托管 ImportSelector  ImportBeanDefinitionRegistrar 2、自动装配 1工作流程在 classpath下搜索所有 META-INF/spring.factories文件将里面 org.springframework.boot.autoconfigure.EnableAutoConfiguration 配置的项都加载到 spring容器 2源码 SpringApplication.run()  prepareContext()  load()  createBeanDefinitionLoader() AbstractApplicationContext.refresh()  invokeBeanFactoryPostProcessors() invokeBeanDefinitionRegistryPostProcessors()  ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry()  ConfigurationClassParser.parse()  processConfigurationClass()  doProcessConfigurationClass()EnableAutoConfiguration  Import({AutoConfigurationImportSelector.class})   AutoConfigurationImportSelector selectImports()  getAutoConfigurationEntry()   getCandidateConfigurations()  SpringFactoriesLoader.loadFactoryNames()  META-INF/spring.factories  org.springframework.boot.autoconfigure.EnableAutoConfigurationXXXX 3实现关键 ImportSelectorConditional可限制加载条件如某些类存在或不存在才实例化若用户自己实现则不加载 springboot自动配置的等等EnableAutoConfiguration(exclude ) 可进行排除 3、启动原理 1源码 // 启动流程在启动类 SpringApplication run() 到 AbstractApplicationContext refresh() 之间做了很多准备工作用 listener监听器来实现比如自动装配、内嵌tomcat等等// 创建 ApplicationContext实例、注册 CommandLinePropertySource参数命令行解析器、刷新 applicationContext并加载单例对象、触发 CommandLineRunner的bean// EventPublishingRunListener 执行 ApplicationStartingEvent、ApplicationEnvironmentPreparedEvent、ApplicationStartedEvent、ApplicationReadyEvent // 启动流程 SpringApplication.run() new SpringApplication() getSpringFactoriesInstances() SpringFactoriesLoader.loadFactoryNames() loadSpringFactories() 加载 spring-boot/spring-boot-autoconfigure下的META-INF/spring.factories SpringApplication.createSpringFactoriesInstances() SpringApplication.run() getRunListeners() new DefaultApplicationArguments() SpringApplication.prepareEnvironment()/configureEnvironment()/configurePropertySources() SpringApplication.createApplicationContext() SpringApplication.prepareContext() postProcessApplicationContext()SpringApplication.refreshContext()// spring-boot org.springframework.context.ApplicationContextInitializer org.springframework.context.ApplicationListener org.springframework.boot.env.PropertySourceLoader org.springframework.boot.SpringApplicationRunListener org.springframework.boot.env.EnvironmentPostProcessor// spring-boot-autoconfigure org.springframework.context.ApplicationContextInitializer org.springframework.context.ApplicationListener org.springframework.boot.autoconfigure.AutoConfigurationImportListener org.springframework.boot.autoconfigure.AutoConfigurationImportFilter org.springframework.boot.autoconfigure.EnableAutoConfiguration 3、Tomcat 原理 四、JDBC Mybatis DAO springboot整合数据库和mybatis_真是呆子啊的博客-CSDN博客 五、Web开发 1、静态资源 1路径优先级优先级高到低 classpath:/META-INF/resourcesclasspath:/resourcesclasspath:/staticclasspath:/public 2、模板引擎 3、视图配置 3、组件配置 2、自定义 web配置springboot集成mvc_spring boot 继承mvc_真是呆子啊的博客-CSDN博客 2、国际化 6、认证 六、应用 1、日志 springboot 默认是 slf4j logbackspring 默认是 jclmybatis 默认是 slf4j log4j 1日志包 日志抽象JCL(Jakarta  Commons Logging)、slf4j日志实现logback、log4j、log4j2、jul(java.util.logging)、jboss-logging日志适配slf4j-log4j12、slf4j-jdk14 2日志配置 3日志级别 2、缓存 3、异常springboot 全局异常处理_真是呆子啊的博客-CSDN博客 4、定时任务springboot集成定时任务_真是呆子啊的博客-CSDN博客 5、事务springboot 事务与并发及回滚_真是呆子啊的博客-CSDN博客 6、异步Async EnableAsync 7、消息/事件监听ApplicationListener  ApplicationEvent 七、运维 1、测试springboot 单元测试集合_真是呆子啊的博客-CSDN博客 2、部署 1开发热部署spring-boot-devtools 2linux 下部署springboot 项目在linux下部署_真是呆子啊的博客-CSDN博客 3docker 下部署docker基于Dockerfile将springboot项目构建成镜像并推送远端仓库_真是呆子啊的博客-CSDN博客 3、监控 添加依赖spring-boot-starter-actuator访问项目 项目访问 /actuator可配置监控参数 management.server.port8888 management.server.servlet.context-path/lin 八、扩展 1、自定义 starter 2、使用外置 tomcat SpringBootServletInitiailzer 3、启动时执行方式 1监听 Bean 使用PostConstruct注解 实现InitializingBean和 DisposableBean接口等同于配置 init-method 2监听 spring 容器 接口 ApplicationContextInitializer 实现CommandLineRunner接口 实现ApplicationRunner接口 实现ServletContextAware接口并重写其setServletContext方法 实现ServletContextListener接口   WebApplicationInitializer SpringBootServletInitializer 4、springboot2 的变化 基于 java8可以不用模板方法提供默认实现而是直接在接口上默认实现
http://www.hkea.cn/news/14303757/

相关文章:

  • 携程网站开发中国建设银行网站的主要功能
  • 自助建站申请申请邮箱企业邮箱
  • 网站建设印花税税率外贸soho建网站
  • 哈尔滨模板建站公司什么自己做网站
  • 怎么做网站的搜索功能如何做网站制作
  • 南阳医疗网站建设公司网站建设为什么要全款
  • 搭建 网站 模版广东省建设执业资格注册中心官方网站
  • 系统软件开发流程洛阳seo
  • 新站seo竞价全国建设工程招标信息网站
  • 建网站没有公司资质wordpress sns主题
  • 最新上线的手游seo价格查询公司
  • 提交谷歌网站如何销售自己产品方法有哪些
  • 网站建设制作设计营销 大连wordpress站群软件
  • php 读取网站文件装修公司加盟十大品牌排行榜
  • 用了mip的网站查找手机网站
  • 海南网站建站wordpress整合ecms同步登录
  • 自己如何在网上做网站临沂河东建设局网站
  • 做自己的网站不是免费的wordpress数据都被存在哪里
  • 东莞网站推广学广告设计学费是多少
  • 个人主页网站设计论文网站注册可以免费吗
  • 2017网站建设趋势nova wordpress主题
  • 商城维护工作内容网站建设广州 济南网站建设公司 网络服务
  • 网站代码在哪里修改上海网站建设思创
  • 幸福人寿保险公司官方网站广州网站建设报价表
  • 江苏新宁建设集团网站上海远丰电商网站建设公司怎么样
  • 专业做互联网招聘的网站有哪些内容免费psd图片素材网站
  • 宣传类的网站有哪些内容百度指数与百度搜索量
  • 郑州模板网站建设策划公司郴州网站建设公司有哪些
  • 网站备案承诺书wordpress 小人
  • 做篮球视频网站哪些网上订餐的网站做的好