一、Spring Boot 入门

1、Hello World探究

1、POM文件

1、父项目

<parent>
  <groupId>org.spring work.boot</groupId>
  <artifactId>spring-boot-starter-parent</artifactId>
  <version>2.0.5.RELEASE</version>
  <relativePath /> <!-- lookup parent from repository -->
</parent>
他的父项目是
<parent>
       <groupId>org.spring work.boot</groupId>
       <artifactId>spring-boot-dependencies</artifactId>
       <version>2.0.5.RELEASE</version>
       <relativePath>../../spring-boot-dependencies</relativePath>
</parent>
他来真正管理Spring Boot 应用里面的所有依赖版本:

Spring Boot 版本仲裁中心:

以后我们导入依赖默认是不需要写版本:(没有在dependencies里面管理的依赖自然需要写版本号)

2、启动器

<dependency>
  <groupId>org.spring work.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
</dependency>

spring-boot-starter-web: Spring Boot 场景启动器帮我们导入了Web模块正常运行所依赖的组件;

Spring Boot 将所有相关场景都抽取出来,做成一个个的starters(启动器),只需要在项目里面引入这些starters相关场景的所有依赖都会导入进来。要用什么功能就导入什么场景的启动器

2、主程序类、注入口类

/*
* @SpringBootApplication 来标注一个主程序类,说明这是一个Spring Boot 应用
*/
@SpringBootApplication
public class DemoApplication {

  public static void main(String[] args) {
      //spring应用启动起来
     SpringApplication.run(DemoApplication.class, args);
  }
}

@SpringBootApplication :Spring Boot 应用标注在某个类上说明这个类是SpringBoot的主配置类,

SpringBoot就应该运行这个类的main方法来启动SpringBoot应用;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(excludeFilters = {
     @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
     @Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) })
public @interface SpringBootApplication {

@SpringBootConfiguration:Spring Boot 的配置类;

标注在某个类上,表示这是一个Spring Boot 的配置类;

@Configuration:配置类上来标注这个注解;

配置类-------配置文件:配置类也是容器中的一个组件;@Component

@EnableAutoConfiguration:开启自动配置功能;

以前我们需要配置的东西,spring Boot 帮我们自动配置;@EnableAutoConfiguration

告诉Spring Boot 开启自动配置功能;这样自动配置才能生效;

@AutoConfigurationPackage
@Import(AutoConfigurationImportSelector.class)
public @interface EnableAutoConfiguration {

@AutoConfigurationPackage:自动配置包

@Import(AutoConfigurationPackages.Registrar.class);

spring的底层注解@import,给容器中导入一个组件;导入的组件由

AutoConfigurationPackages.Registrar.class

==将主配置类(@SpringBootApplication标注的类)的所在包及下面所有子包里面的所有组件扫描到Spring容器;==

@Import(AutoConfigurationImportSelector.class)

给容器中导入组件?

AutoConfigurationImportSelector:导入哪些组件的选择器;

将所有需要导入的组件以全类名的方式返回;这些组件就会被添加到容器中;

会给容器中导入非常多的自动配置类(xxxAutoConfiguration);就是给容器中导入这个场景所需要的所有组件,并配置好这些组件

 

有了自动配置类,免去了我们手动编写配置注入功能组件等的工作;

SpringFactoriesLoader.loadFactoryNames(EnableAutoConfiguration.class,classLoader);

==SpringBoot再启动的时候从类路径下的 -INF/spring.factories中获取EnableAutoConfiguration指定的值,将这些值作为自动配置类导入到容器中,自动配置类就生效,帮我们进行自动配置工作;==;以前我们需要自己配置的东西,自动配置类都帮我们;

J2EE的整体整合解决方案和自动配置都在spring-boot-autoconfigure-2.0.5.RELEASE.jar;

2、使用Spring Initializer快速创建SpringBoot项目

IDE都支持使用Spring的项目创建向导快速创建一个Spring Boot项目;

选择我们需要的模块;向导会联网创建Spring Boot 项目;

默认生成的Spring Boot项目;

  • 主程序已经生成好了,我们只需要我们自己的逻辑

  • resources文件夹中目录结构

    • static:保存所有的静态资源;js css images ;

    • templates:保存所有的模板页面;(Spring Boot 默认jar包使用嵌入式的Tomcat,默认不支持jsp页面);可以使用引擎模板(Freemarker、thymeleaf);

    • application.properties:Spring Boot 应用的配置文件;可以修改一些默认配置;

 

二、 配置文件

1、配置文件

Spring Boot 使用一个全局的配置文件,配置文件名是固定的;

  • application.properties

  • application.yml

配置文件的作用:修改SpringBoot自动配置的默认值;SpringBoot再底层都给我们自动配置好;

YAML(YAML Ain\'t Markup language)

YAML A Markup Language ;是一个标记语言;

YAML isn\'t Markup Language; 不是一个标记语言

标记语言:

以前的配置文件;大多使用的都是xxx. 文件;

YAML:以数据为中心,比json、 等更适合做配置文件;

YAML:配置例子

server:
port: 8090

:

<server>
<port>8081</port>
</server>

2、YAML语法

1、基本语法

k:(空格)v:表示一对键值对(空格必须有);

以空格缩进来控制层级关系:只要是左对齐的一列数据,都是一个层级的

server:
port: 8090
path: /hello

属性和值也是大小写敏感的;

2、值的写法

字面量:普通的值(数学,字符串,布尔)

K:V :字面直接来写;

字符串默认不用加上单引号和双引号;

“ ”: 双引号 ;不会转义字符串里面的特殊字符;特殊字符会作为本身想表示的意思

name: \"zhangsan \\n lisi \":输出:zhangsan 换行 lisi

‘ ’ :单引号;会转义特殊字符,特殊字符最终只是一个普通的字符串数据

name: ‘zhangsan \\n lisi ’ :输出:zhangsan \\n lisi

对象、Map(属性和值)(键值对)

K:V:在下一行来写对象的属性和值的关系;注意缩进

对象还是K:V 的方式

friends:
lastName:zhangsan
age :20

行内写法:

friends:{lastName: zhangsan ,age :20}

 

数组(List、Set)

用-值表示数组中的一个元素

pets:
-cat
-dog
-pig

行内写法

pets:{cat,dog,pig}

3、配置文件值注入

配置文件

person:
  lastName: zhangsan
  age: 18
  boss: false
  birth: 2018/10/4
  maps: {k1: v1, k2: 12}
  lists:
    -lisi
    -zhaoliu
  dog:
    name: 小狗
    age: 2

javaBean:

/*
*将配置文件中配置的每一个属性的值,映射到这个组件中
*@ConfigurationProperties:告诉springBoot将本类中的所有属性和配置文件中相关配置进行绑定;
*       prefix = \"person\"配置文件中哪个下面的所有属性进行一一映射
* 只有这个组件是容器中的组件,才能使用容器提供的@ConfigurationProperties功能;
*/
@Component
@ConfigurationProperties(prefix = \"person\")
public class Person {
   private String lastName;
   private Integer age;
   private Boolean boss;
   private Date birth;

   private Map<String, > maps;
   private List< > lists;
   private Dog dog;

我们可以导入配置文件处理器,以后编写配置文件就有提示了

<!--导入配置文件处理器,配置文件进行绑定就会有提示 -->
<dependency>
   <groupId>org.spring work.boot</groupId>
   <artifactId>spring-boot-configuration-processor</artifactId>
   <optional>true</optional>
</dependency>

1、properties配置文件在idea中默认UTF-8可能会乱码

 

 

2、@value获取值和@ConfigurationProperties获取值比较

 @CONFIGURATIONPROPERTIES@VALUE
功能 批量注入配置文件中的属性 一个一个指定
松散绑定(松散语法) 支持 不支持
SpEL(表达式计算) 不支持 支持
JSR303数据校验 支持 不支持
复杂类型封装 支持 不支持

配置文件yml还是properties他们都能获取到值;

如果说,我们只是在某和业务逻辑中需要获取一下配置文件的某项值,使用@Value

如果说我们专门编写了一个javabean来和配置文件进行映射,我们就直接使用@ConfigurationProperties;

 

3、配置文件注入值数据校验

@Component
@ConfigurationProperties(prefix = \"person\")
@Validated
public class Person {
   /*
   * <bean class=\"Persion\">
   *     <property name =\"lastName\" value=\"字面量/${key}从环境变量,配置文件中获取值/#{SpEl}\"</property>
   * </bean>
   * */
//   @Value(\"${person.last-name}\")
   @Email
   private String lastName;
 // @Value(\"#{11*2}\")
   private Integer age;
   //@Value(\"true\")

   private Boolean boss;
   private Date birth;

   private Map<String, > maps;
   private List< > lists;
   private Dog dog;

4、@PropertySource&@importResource

@PropertySoure:加载指定的配置文件

/*
*将配置文件中配置的每一个属性的值,映射到这个组件中
*@ConfigurationProperties:告诉springBoot将本类中的所有属性和配置文件中相关配置进行绑定;
*       prefix = \"person\"配置文件中哪个下面的所有属性进行一一映射
*       默认从全局配置文件中获取值;
* 只有这个组件是容器中的组件,才能使用容器提供的@ConfigurationProperties功能;
*/
@Component
@ConfigurationProperties(prefix = \"person\")
@PropertySource(value = {\"classpath:person.properties\"})
//@Validated
public class Person {
   /*
   * <bean class=\"Persion\">
   *     <property name =\"lastName\" value=\"字面量/${key}从环境变量,配置文件中获取值/#{SpEl}\"</property>
   * </bean>
   * */
//   @Value(\"${person.last-name}\")
   @Email
   private String lastName;
 // @Value(\"#{11*2}\")
   private Integer age;
   //@Value(\"true\")

   private Boolean boss;

@importResource:导入Spring的配置文件,让配置文件里面的内容生效;

Spring Boot 里面没有Spring的配置文件,我们自己编写的配置文件,也不能自动识别;想让Spring的配置文件生效,加载进来;@ImportResource 标注在一个配置类上

@ImportResource( locations = {\"classpath:beans. \"})
导入Spring的配置文件让其生效

不来编写配置Spring配置文件

<?  version=\"1.0\" encoding=\"UTF-8\"?>
<beans ns=\"http://www.spring work.org/schema/beans\"
      ns:xsi=\"http://www.w3.org/2001/ Schema-instance\"
      xsi:schemaLocation=\"http://www.spring work.org/schema/beans http://www.spring work.org/schema/beans/spring-beans.xsd\">

  <bean id=\"helloService\" class=\"org.wl.springboot.service.HelloService\"></bean>
</beans>

SpringBoot 推荐给容器中添加组件的方式;

1、配置类=========Spring配置文件

2、使用@Bean给容器中添加组件

/*
* @Configuration:指明当前类是一个配置文件;就是来替代之前的Spring配置文件
*在配置文件中用<bean></bean>标签添加组件
*
* */

@Configuration
public class MyAppConfig {
   //将方法的返回值添加到容器中;容器中这个组件默认的id就是方法名
   @Bean
   public HelloService helloService(){
       System.out.println(\"配置类@bean给容器中添加组价了。。。\");
       return new HelloService();
  }
}

4、配置文件占位符

1、随机数

${random.uuid} ${random.int} ${random.long}
${random.int(10)} ${random.int[1024,65536]

2、占位符获取之前配置的值,如果没有可以是用:指定默认值

person:
  lastName: zhangsan ${random.uuid}
  age: ${random.int}
  boss: false
  birth: 2018/10/4
  maps: {k1: v1, k2: 12}
  lists:
    -lisi
    -zhaoliu
  dog:
    name: ${person.hello:hello}_dog
    age: 2

5、Profile

1、多Profile文件

我们在主配置文件编写的时候,文件名可以是application-{profile}.properties/yml

默认使用application.properties的配置;

 

2、yml支持多文档块方式

server:
port: 8090
spring:
profiles:
  active: dev
---

server:
port: 8003
spring:
profiles: dev
---

server:
port: 8004
spring:
profiles: prod

---

 

3、激活指定profile

1、在配置文件中指定Spring.properties.active =dev

2、命令行:

java -jar spring-boot-02-config-0.0.1-SNAPSHOT.jar --spring.profiles.active=dev

可以直接在测试的时候,配置传入命令行参数

3、 虚拟机参数:

-Dspring.profile.active=dev

6、配置文件加载位置

SpringBoot 启动会扫描一下位置的application.properties或者application.yml文件作为Spring Boot 的默认配置

文件

-file:/config/

-file:/

-classpath:/config/

-classpath:/

优先级由高到低,高优先级的配置会覆盖低优先级的配置;

SpringBoot会从这四个位置全部加载主配置文件;互补配置

==spring-boot配置文件中server.context-path=/XXXXXXX不起作用:==

==原因是更新后写法变成了`server.servlet.context-path=/XXXXXX,这样写即可==

 

==我们还可以通过spring.config.location来改变默认的配置文件位置==

项目打包好以后,我们可以使用命令行参数的形式,启动项目的时候来指定配置文件的新位置;指定配置文件和默认加载的这些配置文件共同起作用形成互补配置

java -jar spring-boot-02-config-02-0.0.1-SNAPSHOT.jar --spring.config.location=C:\\Users\\80481\\Desktop\\application.properties

7、外部配置加载顺序

SpringBoot也可以从以下位置加载配置:按照优先级从高到低;高优先级的配置覆盖低优先级的配置,所有配置会形成互补配置

  1. 命令行参数

    • 所有的配置都可以在命令行上进行指定;

    • 多个配置用空格分开; –配置项=值

    java -jar spring-boot-02-config-02-0.0.1-SNAPSHOT.jar 
    --server.port=8087 --server.context-path=/abc
    1234

    2.来自java:comp/env的JNDI属性 3.Java系统属性(System.getProperties()) 4.操作系统环境变量 5.RandomValuePropertySource配置的random.*属性值


    6.jar包外部的application-{profile}.properties或application.yml(带spring.profile)配置文件 7.jar包内部的application-{profile}.properties或application.yml(带spring.profile)配置文件 8.jar包外部的application.properties或application.yml(不带spring.profile)配置文件 9.jar包内部的application.properties或application.yml(不带spring.profile)配置文件

    由jar包外向jar包内进行寻找,优先加载待profile的,再加载不带profile的。1

    10.@Configuration注解类上的@PropertySource 11.通过SpringApplication.setDefaultProperties指定的默认属性

    所有的配置加载来源;

    参考官方文档

8、自动配置原理

配置文件到底能写什么?怎么写?自动配置原理;

配置文件能配置的属性参照

1、自动配置原理

1)、SpringBoot启动的时候加载主配置类,开启了自动配置功能==@EnableAutoConfiguration==

2)、@EnableAutoConfiguration作用:

  • 利用AutoConfigurationImportSelector给容器中导入了一些组件?

  •  

  • 可以查看selectImports()方法的内容;

  •  

  • List<String> configurations = getCandidateConfigurations(annotation data, ​ attributes);获取候选的配置

    • SpringFactoriesLoader.loadFactoryNames()
      扫描所有jar包路径下的 -INF/spring.factories
      把扫描到的这些文件的内容包装成properties对象
      从properties中获取到EnableAutoConfiguration.class类(类名)对应的值,然后把他们添加在容器中

    ==将类路径下 -INF/spring.factories里面配置的所有EnableAutoConfiguration的值加入到了容器中==

# Auto Configure
org.spring work.boot.autoconfigure.EnableAutoConfiguration=\\
org.spring work.boot.autoconfigure.admin.SpringApplicationAdminJmxAutoConfiguration,\\
org.spring work.boot.autoconfigure.aop.AopAutoConfiguration,\\
org.spring work.boot.autoconfigure.amqp.RabbitAutoConfiguration,\\
org.spring work.boot.autoconfigure.batch.BatchAutoConfiguration,\\
org.spring work.boot.autoconfigure.cache.CacheAutoConfiguration,\\
org.spring work.boot.autoconfigure.cassandra.CassandraAutoConfiguration,\\
org.spring work.boot.autoconfigure.cloud.CloudAutoConfiguration,\\
org.spring work.boot.autoconfigure.context.ConfigurationPropertiesAutoConfiguration,\\
org.spring work.boot.autoconfigure.context.MessageSourceAutoConfiguration,\\
org.spring work.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration,\\
org.spring work.boot.autoconfigure.couch .Couch AutoConfiguration,\\
org.spring work.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.cassandra.CassandraReactiveDataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.cassandra.CassandraReactiveRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.cassandra.CassandraRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.couch .Couch DataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.couch .Couch ReactiveDataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.couch .Couch ReactiveRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.couch .Couch RepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.ldap.LdapDataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.ldap.LdapRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.mongo.MongoReactiveRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.redis.RedisAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.redis.RedisReactiveAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration,\\
org.spring work.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration,\\
org.spring work.boot.autoconfigure.elasticsearch.jest.JestAutoConfiguration,\\
org.spring work.boot.autoconfigure.flyway.FlywayAutoConfiguration,\\
org.spring work.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration,\\
org.spring work.boot.autoconfigure.gson.GsonAutoConfiguration,\\
org.spring work.boot.autoconfigure.h2.H2ConsoleAutoConfiguration,\\
org.spring work.boot.autoconfigure.hateoas.HypermediaAutoConfiguration,\\
org.spring work.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration,\\
org.spring work.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration,\\
org.spring work.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration,\\
org.spring work.boot.autoconfigure.http.codec.CodecsAutoConfiguration,\\
org.spring work.boot.autoconfigure.influx.InfluxDbAutoConfiguration,\\
org.spring work.boot.autoconfigure.info.ProjectInfoAutoConfiguration,\\
org.spring work.boot.autoconfigure.integration.IntegrationAutoConfiguration,\\
org.spring work.boot.autoconfigure.jackson.JacksonAutoConfiguration,\\
org.spring work.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\\
org.spring work.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration,\\
org.spring work.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration,\\
org.spring work.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration,\\
org.spring work.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration,\\
org.spring work.boot.autoconfigure.jms.JmsAutoConfiguration,\\
org.spring work.boot.autoconfigure.jmx.JmxAutoConfiguration,\\
org.spring work.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration,\\
org.spring work.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration,\\
org.spring work.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration,\\
org.spring work.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration,\\
org.spring work.boot.autoconfigure.jersey.JerseyAutoConfiguration,\\
org.spring work.boot.autoconfigure.jooq.JooqAutoConfiguration,\\
org.spring work.boot.autoconfigure.jsonb.JsonbAutoConfiguration,\\
org.spring work.boot.autoconfigure.kafka.KafkaAutoConfiguration,\\
org.spring work.boot.autoconfigure.ldap. ded. dedLdapAutoConfiguration,\\
org.spring work.boot.autoconfigure.ldap.LdapAutoConfiguration,\\
org.spring work.boot.autoconfigure.liqui .Liqui AutoConfiguration,\\
org.spring work.boot.autoconfigure.mail.MailSenderAutoConfiguration,\\
org.spring work.boot.autoconfigure.mail.MailSenderValidatorAutoConfiguration,\\
org.spring work.boot.autoconfigure.mongo. ded. dedMongoAutoConfiguration,\\
org.spring work.boot.autoconfigure.mongo.MongoAutoConfiguration,\\
org.spring work.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration,\\
org.spring work.boot.autoconfigure.mustache.MustacheAutoConfiguration,\\
org.spring work.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\\
org.spring work.boot.autoconfigure.quartz.QuartzAutoConfiguration,\\
org.spring work.boot.autoconfigure.reactor.core.ReactorCoreAutoConfiguration,\\
org.spring work.boot.autoconfigure.security.servlet.SecurityAutoConfiguration,\\
org.spring work.boot.autoconfigure.security.servlet.SecurityRequestMatcherProviderAutoConfiguration,\\
org.spring work.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration,\\
org.spring work.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration,\\
org.spring work.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration,\\
org.spring work.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration,\\
org.spring work.boot.autoconfigure.sendgrid.SendGridAutoConfiguration,\\
org.spring work.boot.autoconfigure.session.SessionAutoConfiguration,\\
org.spring work.boot.autoconfigure.security.oauth2.client.OAuth2ClientAutoConfiguration,\\
org.spring work.boot.autoconfigure.solr.SolrAutoConfiguration,\\
org.spring work.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration,\\
org.spring work.boot.autoconfigure.transaction.TransactionAutoConfiguration,\\
org.spring work.boot.autoconfigure.transaction.jta.JtaAutoConfiguration,\\
org.spring work.boot.autoconfigure.validation.ValidationAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.client.RestTemplateAutoConfiguration,\\
org.spring work.boot.autoconfigure.web. ded. dedWebServerFactoryCustomizerAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.reactive.HttpHandlerAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.reactive.ReactiveWebServerFactoryAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.servlet.HttpEncodingAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.servlet.MultipartAutoConfiguration,\\
org.spring work.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration,\\
org.spring work.boot.autoconfigure.websocket.reactive.WebSocketReactiveAutoConfiguration,\\
org.spring work.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration,\\
org.spring work.boot.autoconfigure.websocket.servlet.WebSocketMessagingAutoConfiguration,\\
org.spring work.boot.autoconfigure.webservices.WebServicesAutoConfiguration

# Failure analyzers
org.spring work.boot.diagnostics.FailureAnalyzer=\\
org.spring work.boot.autoconfigure.diagnostics.analyzer.NoSuchBeanDefinitionFailureAnalyzer,\\
org.spring work.boot.autoconfigure.jdbc.DataSourceBeanCreationFailureAnalyzer,\\
org.spring work.boot.autoconfigure.jdbc.HikariDriverConfigurationFailureAnalyzer,\\
org.spring work.boot.autoconfigure.session.NonUniqueSessionRepositoryFailureAnalyzer

# Template availability providers
org.spring work.boot.autoconfigure.template.TemplateAvailabilityProvider=\\
org.spring work.boot.autoconfigure.freemarker.FreeMarkerTemplateAvailabilityProvider,\\
org.spring work.boot.autoconfigure.mustache.MustacheTemplateAvailabilityProvider,\\
org.spring work.boot.autoconfigure.groovy.template.GroovyTemplateAvailabilityProvider,\\
org.spring work.boot.autoconfigure.thymeleaf.ThymeleafTemplateAvailabilityProvider,\\
org.spring work.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvider
收藏 打印
您的足迹: