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

专门做房产的网站广州网站建设费用

专门做房产的网站,广州网站建设费用,有了网站域名如何做网站,wordpress 带数据库吗Tips: 以下内容根据源码中的注解翻译 SpringApplication SpringApplication可用来从一个Java main方法引导和启动一个Spring应用。默认情况下,SpringApplication按照以下步骤引导你的应用: 创建一个合适的ApplicationContext(依赖于你的cl…

Tips: 以下内容根据源码中的注解翻译

SpringApplication

SpringApplication可用来从一个Java main方法引导和启动一个Spring应用。默认情况下,SpringApplication按照以下步骤引导你的应用:

  • 创建一个合适的ApplicationContext(依赖于你的classpath)
  • 注册一个CommandLinePropertySource,用来将命令行参数暴露为Spring属性
  • 刷新应用上下文,加载所有单例beans
  • 触发所有的CommandLineRunner beans

在绝大多数情况下,可以直接在main方法中调用静态方法 SpringApplication.run(Class, String[])来引导你的应用:

@Configuration@EnableAutoConfigurationpublic class MyApplication  {// ... Bean definitionspublic static void main(String[] args) {SpringApplication.run(MyApplication.class, args);}}

想要使用更多高级配置,可以创建一个SpringApplication实例并自定义,然后调用实例的run方法:

public static void main(String[] args) {SpringApplication application = new SpringApplication(MyApplication.class);// ... customize application settings hereapplication.run(args)}

SpringApplications可以从各种不同的资源读入beans。通常建议用一个单独的@Configuration类来引导你的应用,尽管如此,你也可以从以下资源读入beans:

  • 完全限定的类名,将被AnnotatedBeanDefinitionReader加载
  • XML配置文件的路径,将被XmlBeanDefintionReader加载,或者是groovy脚本,将被GroovyBeanDefintionReader加载
  • 包名,将被ClassPathBeanDefinitioinReader扫描

Configuration属性会被绑定到SpringApplication。这让动态设置SpringApplication属性成为可能,如附加的资源("spring.main.sources" - 一个CSV列表) ,表示一个web环境的标识("spring.main.web-application-type=none" ),或 关闭banner的标记("spring.main.banner-mode=off")

源码中的注解:

Class that can be used to bootstrap and launch a Spring application from a Java main method. By default class will perform the following steps to bootstrap your application:
Create an appropriate ApplicationContext instance (depending on your classpath)
Register a CommandLinePropertySource to expose command line arguments as Spring properties
Refresh the application context, loading all singleton beans
Trigger any CommandLineRunner beans
In most circumstances the static run(Class, String[]) method can be called directly from your main method to bootstrap your application:@Configuration@EnableAutoConfigurationpublic class MyApplication  {// ... Bean definitionspublic static void main(String[] args) {SpringApplication.run(MyApplication.class, args);}}For more advanced configuration a SpringApplication instance can be created and customized before being run:public static void main(String[] args) {SpringApplication application = new SpringApplication(MyApplication.class);// ... customize application settings hereapplication.run(args)}SpringApplications can read beans from a variety of different sources. It is generally recommended that a single @Configuration class is used to bootstrap your application, however, you may also set sources from:
The fully qualified class name to be loaded by AnnotatedBeanDefinitionReader
The location of an XML resource to be loaded by XmlBeanDefinitionReader, or a groovy script to be loaded by GroovyBeanDefinitionReader
The name of a package to be scanned by ClassPathBeanDefinitionScanner
Configuration properties are also bound to the SpringApplication. This makes it possible to set SpringApplication properties dynamically, like additional sources ("spring.main.sources" - a CSV list) the flag to indicate a web environment ("spring.main.web-application-type=none") or the flag to switch off the banner ("spring.main.banner-mode=off").
Since:
1.0.0
See Also:
run(Class, String[]), run(Class[], String[]), SpringApplication(Class...)

http://www.ds6.com.cn/news/96006.html

相关文章:

  • 可以做推广的门户网站怎么制作网站二维码
  • 昆山建设招标信息网站抄一则新闻四年级
  • 增加网站访客搜索推广渠道
  • 玉田县建设局网站免费舆情监测平台
  • 天津哪家做企业网站网站推广的作用在哪里
  • wordpress 分块首页seo小白入门教学
  • 广东模板建站平台seo自动优化软件下载
  • 简易的网站模板互联网项目
  • 网上做网站怎么赚钱吗英文网站seo
  • 如何引导企业老板做网站百度快照官网
  • 网站根目录文件宁波正规优化seo公司
  • 果麦传媒的网站怎么做的什么网站做推广比较好
  • 中山做网站哪家专业百度搜索风云榜人物
  • 网站建网站建设seo帮帮您厦门seo排名公司
  • 资讯网站策划怎么写sem是什么意思中文
  • 深圳网站开发哪个公司好深圳市昊客网络科技有限公司
  • 现在用什么工具做网站好百度一下就知道了官网榡
  • 品牌网站怎么做seo营销战略有哪些内容
  • 石家庄平山网站推广优化公司网站怎么建立
  • 石家庄最新信息苏州关键词优化排名推广
  • 网站怎么做推广和优化今天的特大新闻有哪些
  • 手机门户网站建设方案全渠道营销
  • 怎么做网站反向链接优化seo设置
  • 淘宝客网站程序购米全网营销推广是什么
  • WordPress时间格式插件东莞关键词优化实力乐云seo
  • 知名电子商务网站今日最新新闻摘抄
  • 个性化WordPress网站大片ppt免费下载安装
  • 怀集建设房管部门网站漯河搜狗关键词优化排名软件
  • 深圳做网站公司有哪些地方百度sem认证
  • 千库网ppt怎么快速优化关键词排名