Cobbler Multi -System Automation Installation

2022-12-20   ES  

SpringBoot should now be used by most companies, especially it is simplified to simplify the writing of many code in the form of configuration instead of XML, but what configuration items it has, it still takes some time to take a good look, so I finish finishing A SpringBoot feature configuration, I hope it is useful to you.

I have seen a configuration item @SpringBootApplication
is also a configuration that must be added to the startup item.

In fact, this configuration item has contained a lot of configuration items, as shown in the figure:
在这里插入图片描述

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
These three are meta -annotations.
TARGET modifies the range of the objects modified by Annotion, the period of the life of the Retention modification of the annotation of the annotation, and the Documented explaining that this annotation will be recorded by the Javadoc tools. Since these generally do not move it, just pass by

  1. @SpringBootConfiguration
    @SpringBootConfiguration is to indicate that the class is a configuration class. It can be seen that it is the role of @Configuration, but it belongs to SpringBoot and @Configuration belongs to Spring.
    在这里插入图片描述
  2. @EnableAutoConfiguration
    在这里插入图片描述

    is because the class of AutoConfigurationimportselector can achieve the condition that the condition is loaded (because the autoConfigure provides a lot of conditions, which can be seen below) to be loaded into the current IOC container with @Configuration.

在这里插入图片描述在这里插入图片描述
ORG.SpringFramework.Boot.autoConfigure also provides a lot of annotations. When using this annotation, it will be registered in the container only when it meets their respective conditions.
Since there are a lot, it is not used. Here is only some commonly used or used by yourself.

  • ConditiononBean refers to the existence of Bean in the container to take effect. ConditiononMissBean corresponds to no effect.
  • ConditiononClass means that when ClassPath exists in this class, the ConditiononMissClass is also effective when it does not exist when it does not exist.
  • ConditionOnExpression refers
  • ConditionalonProperty (name = “”,, havingvalue = “”) The parameter setting values in the set settings
  • ConditionalonsingLecandidate refers to a bean that exists in the container

or above is a record notes for personal learning. It is not easy to knock on your hands.
also welcome the guidance of Dasiu.

source

Related Posts

[244 Issue] The back slope \\ in mysql, too pit! Intersection

JS determine whether the input string is empty, space, null summary

Before design mode-Seven major software architecture design principles

[SpringCloud] Fenchley & Greenwich skeleton construction (1)

Cobbler Multi -System Automation Installation

Random Posts

bzoj4199 [luogup2178] wine tasting conference [noI2015] (suffix array+and check) Icefox

Android progress bar style

javascript’s thousands of points and remove thousands of points

qt can’t find -lpulse -mailoop -glib, can’t find -lpulse problem

html -mobile terminal