Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
42c2059d
Commit
42c2059d
authored
Jun 06, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.x'
parents
0d63e7f5
f6c99361
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
1 deletion
+44
-1
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+44
-1
No files found.
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
42c2059d
...
@@ -6208,13 +6208,21 @@ class annotated with `@SpringBootApplication` or `@SpringBootConfiguration`. As
...
@@ -6208,13 +6208,21 @@ class annotated with `@SpringBootApplication` or `@SpringBootConfiguration`. As
you <<using-boot-structuring-your-code, structured your code>> in a sensible way, your
you <<using-boot-structuring-your-code, structured your code>> in a sensible way, your
main configuration is usually found.
main configuration is usually found.
NOTE: If you use a
[NOTE]
====
If you use a
<<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests, test
<<boot-features-testing-spring-boot-applications-testing-autoconfigured-tests, test
annotation to test a more specific slice of your application>>, you should avoid adding
annotation to test a more specific slice of your application>>, you should avoid adding
configuration settings that are specific to a particular area on the
configuration settings that are specific to a particular area on the
<<boot-features-testing-spring-boot-applications-testing-user-configuration, main
<<boot-features-testing-spring-boot-applications-testing-user-configuration, main
method's application class>>.
method's application class>>.
The underlying component scan configuration of `@SpringBootApplication` defines exclude
filters that are used to make sure slicing works as expected. If you are using an explicit
`@ComponentScan` directive on your `@SpringBootApplication`-annoted class, be aware that
those filters will be disabled. If you are using slicing, you should define them again.
====
If you want to customize the primary configuration, you can use a nested
If you want to customize the primary configuration, you can use a nested
`@TestConfiguration` class. Unlike a nested `@Configuration` class, which would be used
`@TestConfiguration` class. Unlike a nested `@Configuration` class, which would be used
instead of your application's primary configuration, a nested `@TestConfiguration` class
instead of your application's primary configuration, a nested `@TestConfiguration` class
...
@@ -7721,6 +7729,41 @@ TIP: You should mark the dependencies to the library as optional so that you can
...
@@ -7721,6 +7729,41 @@ TIP: You should mark the dependencies to the library as optional so that you can
the `autoconfigure` module in your projects more easily. If you do it that way, the
the `autoconfigure` module in your projects more easily. If you do it that way, the
library is not provided and, by default, Spring Boot backs off.
library is not provided and, by default, Spring Boot backs off.
Spring Boot uses an annotation processor to collect the conditions on auto-configurations
in a metadata file (`META-INF/spring-autoconfigure-metadata.json`). If that file is
present, it is used to eagerly filter auto-configurations that do not match, which will
improve startup time. It is recommended to add the following dependency in a module that
contains auto-configurations:
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
----
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure-processor</artifactId>
<optional>true</optional>
</dependency>
----
With Gradle 4.5 and earlier, the dependency should be declared in the `compileOnly`
configuration, as shown in the following example:
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]
----
dependencies {
compileOnly "org.springframework.boot:spring-boot-autoconfigure-processor"
}
----
With Gradle 4.6 and later, the dependency should be declared in the `annotationProcessor`
configuration, as shown in the following example:
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]
----
dependencies {
annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor"
}
----
[[boot-features-custom-starter-module-starter]]
[[boot-features-custom-starter-module-starter]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment