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
9b952dd3
Commit
9b952dd3
authored
Feb 01, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8148 from izeye:polish-20170131
* pr/8148: Polish
parents
8a0f8cf9
846994e4
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
19 additions
and
21 deletions
+19
-21
AutoConfigurationImportEvent.java
...work/boot/autoconfigure/AutoConfigurationImportEvent.java
+2
-2
AutoConfigurationImportFilter.java
...ork/boot/autoconfigure/AutoConfigurationImportFilter.java
+2
-2
AutoConfigurationImportListener.java
...k/boot/autoconfigure/AutoConfigurationImportListener.java
+2
-2
AutoConfigurationImportSelector.java
...k/boot/autoconfigure/AutoConfigurationImportSelector.java
+2
-2
EnableAutoConfigurationImportSelectorTests.java
...configure/EnableAutoConfigurationImportSelectorTests.java
+0
-2
howto.adoc
spring-boot-docs/src/main/asciidoc/howto.adoc
+1
-1
production-ready-features.adoc
...oot-docs/src/main/asciidoc/production-ready-features.adoc
+1
-1
spring-boot-features.adoc
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+3
-3
using-spring-boot.adoc
spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc
+1
-1
DataMongoTestIntegrationTests.java
...toconfigure/data/mongo/DataMongoTestIntegrationTests.java
+1
-1
DataMongoTestWithIncludeFilterIntegrationTests.java
...mongo/DataMongoTestWithIncludeFilterIntegrationTests.java
+1
-1
ExampleService.java
...rk/boot/test/autoconfigure/data/mongo/ExampleService.java
+1
-1
TestDatabaseAutoConfigurationTests.java
...utoconfigure/jdbc/TestDatabaseAutoConfigurationTests.java
+2
-2
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportEvent.java
View file @
9b952dd3
...
@@ -44,7 +44,7 @@ public class AutoConfigurationImportEvent extends EventObject {
...
@@ -44,7 +44,7 @@ public class AutoConfigurationImportEvent extends EventObject {
/**
/**
* Return the auto-configuration candidate configurations that are going to be
* Return the auto-configuration candidate configurations that are going to be
* imported.
* imported.
* @return the
configurations the
auto-configuration candidates
* @return the auto-configuration candidates
*/
*/
public
List
<
String
>
getCandidateConfigurations
()
{
public
List
<
String
>
getCandidateConfigurations
()
{
return
this
.
candidateConfigurations
;
return
this
.
candidateConfigurations
;
...
@@ -52,7 +52,7 @@ public class AutoConfigurationImportEvent extends EventObject {
...
@@ -52,7 +52,7 @@ public class AutoConfigurationImportEvent extends EventObject {
/**
/**
* Return the exclusions that were applied.
* Return the exclusions that were applied.
* @return the exclusions
the exclusions
applied
* @return the exclusions applied
*/
*/
public
Set
<
String
>
getExclusions
()
{
public
Set
<
String
>
getExclusions
()
{
return
this
.
exclusions
;
return
this
.
exclusions
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportFilter.java
View file @
9b952dd3
...
@@ -31,8 +31,8 @@ import org.springframework.context.ResourceLoaderAware;
...
@@ -31,8 +31,8 @@ import org.springframework.context.ResourceLoaderAware;
* methods will be called prior to {@link #match}:
* methods will be called prior to {@link #match}:
* <ul>
* <ul>
* <li>{@link EnvironmentAware}</li>
* <li>{@link EnvironmentAware}</li>
* <li>{@link BeanFactoryAware
}</li>
* <li>{@link BeanFactoryAware}</li>
* <li>{@link BeanClassLoaderAware
}</li>
* <li>{@link BeanClassLoaderAware}</li>
* <li>{@link ResourceLoaderAware}</li>
* <li>{@link ResourceLoaderAware}</li>
* </ul>
* </ul>
*
*
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportListener.java
View file @
9b952dd3
...
@@ -33,8 +33,8 @@ import org.springframework.context.ResourceLoaderAware;
...
@@ -33,8 +33,8 @@ import org.springframework.context.ResourceLoaderAware;
* {@link #onAutoConfigurationImportEvent(AutoConfigurationImportEvent)}:
* {@link #onAutoConfigurationImportEvent(AutoConfigurationImportEvent)}:
* <ul>
* <ul>
* <li>{@link EnvironmentAware}</li>
* <li>{@link EnvironmentAware}</li>
* <li>{@link BeanFactoryAware
}</li>
* <li>{@link BeanFactoryAware}</li>
* <li>{@link BeanClassLoaderAware
}</li>
* <li>{@link BeanClassLoaderAware}</li>
* <li>{@link ResourceLoaderAware}</li>
* <li>{@link ResourceLoaderAware}</li>
* </ul>
* </ul>
*
*
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java
View file @
9b952dd3
...
@@ -99,7 +99,7 @@ public class AutoConfigurationImportSelector
...
@@ -99,7 +99,7 @@ public class AutoConfigurationImportSelector
checkExcludedClasses
(
configurations
,
exclusions
);
checkExcludedClasses
(
configurations
,
exclusions
);
configurations
.
removeAll
(
exclusions
);
configurations
.
removeAll
(
exclusions
);
configurations
=
filter
(
configurations
,
autoConfigurationMetadata
);
configurations
=
filter
(
configurations
,
autoConfigurationMetadata
);
fireAutoConfigurationImport
Listener
s
(
configurations
,
exclusions
);
fireAutoConfigurationImport
Event
s
(
configurations
,
exclusions
);
return
configurations
.
toArray
(
new
String
[
configurations
.
size
()]);
return
configurations
.
toArray
(
new
String
[
configurations
.
size
()]);
}
}
catch
(
IOException
ex
)
{
catch
(
IOException
ex
)
{
...
@@ -300,7 +300,7 @@ public class AutoConfigurationImportSelector
...
@@ -300,7 +300,7 @@ public class AutoConfigurationImportSelector
return
Arrays
.
asList
(
value
==
null
?
new
String
[
0
]
:
value
);
return
Arrays
.
asList
(
value
==
null
?
new
String
[
0
]
:
value
);
}
}
private
void
fireAutoConfigurationImport
Listener
s
(
List
<
String
>
configurations
,
private
void
fireAutoConfigurationImport
Event
s
(
List
<
String
>
configurations
,
Set
<
String
>
exclusions
)
{
Set
<
String
>
exclusions
)
{
List
<
AutoConfigurationImportListener
>
listeners
=
getAutoConfigurationImportListeners
();
List
<
AutoConfigurationImportListener
>
listeners
=
getAutoConfigurationImportListeners
();
if
(!
listeners
.
isEmpty
())
{
if
(!
listeners
.
isEmpty
())
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java
View file @
9b952dd3
...
@@ -18,7 +18,6 @@ package org.springframework.boot.autoconfigure;
...
@@ -18,7 +18,6 @@ package org.springframework.boot.autoconfigure;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.mockito.MockitoAnnotations
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.support.DefaultListableBeanFactory
;
import
org.springframework.beans.factory.support.DefaultListableBeanFactory
;
...
@@ -46,7 +45,6 @@ public class EnableAutoConfigurationImportSelectorTests {
...
@@ -46,7 +45,6 @@ public class EnableAutoConfigurationImportSelectorTests {
@Before
@Before
public
void
setup
()
{
public
void
setup
()
{
MockitoAnnotations
.
initMocks
(
this
);
this
.
importSelector
.
setBeanFactory
(
this
.
beanFactory
);
this
.
importSelector
.
setBeanFactory
(
this
.
beanFactory
);
this
.
importSelector
.
setEnvironment
(
this
.
environment
);
this
.
importSelector
.
setEnvironment
(
this
.
environment
);
this
.
importSelector
.
setResourceLoader
(
new
DefaultResourceLoader
());
this
.
importSelector
.
setResourceLoader
(
new
DefaultResourceLoader
());
...
...
spring-boot-docs/src/main/asciidoc/howto.adoc
View file @
9b952dd3
...
@@ -3080,7 +3080,7 @@ application's main class to extend `SpringBootServletInitializer`:
...
@@ -3080,7 +3080,7 @@ application's main class to extend `SpringBootServletInitializer`:
The next step is to update your build configuration so that your project produces a war file
The next step is to update your build configuration so that your project produces a war file
rather than a jar file. If you're using Maven and using `spring-boot-starter-parent` (which
rather than a jar file. If you're using Maven and using `spring-boot-starter-parent` (which
configures Maven's war plugin for you) all you need to do is modify `pom.xml` to change the
configures Maven's war plugin for you) all you need to do is
to
modify `pom.xml` to change the
packaging to war:
packaging to war:
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
...
...
spring-boot-docs/src/main/asciidoc/production-ready-features.adoc
View file @
9b952dd3
...
@@ -1221,7 +1221,7 @@ In addition, any `MetricReader` that you define and mark as `@ExportMetricReader
...
@@ -1221,7 +1221,7 @@ In addition, any `MetricReader` that you define and mark as `@ExportMetricReader
have
its
values
exported
by
the
default
exporter
.
have
its
values
exported
by
the
default
exporter
.
NOTE
:
This
feature
is
enabling
scheduling
in
your
application
(`@
EnableScheduling
`)
which
NOTE
:
This
feature
is
enabling
scheduling
in
your
application
(`@
EnableScheduling
`)
which
can
be
a
problem
if
you
run
an
integration
test
s
as
your
own
scheduled
tasks
will
start
.
can
be
a
problem
if
you
run
an
integration
test
as
your
own
scheduled
tasks
will
start
.
You
can
disable
this
behaviour
by
setting
`
spring
.
metrics
.
export
.
enabled
`
to
`
false
`.
You
can
disable
this
behaviour
by
setting
`
spring
.
metrics
.
export
.
enabled
`
to
`
false
`.
The
default
exporter
is
a
`
MetricCopyExporter
`
which
tries
to
optimize
itself
by
not
The
default
exporter
is
a
`
MetricCopyExporter
`
which
tries
to
optimize
itself
by
not
...
...
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
9b952dd3
...
@@ -1091,7 +1091,7 @@ only rely on custom converters qualified with `@ConfigurationPropertiesBinding`.
...
@@ -1091,7 +1091,7 @@ only rely on custom converters qualified with `@ConfigurationPropertiesBinding`.
[[boot-features-external-config-validation]]
[[boot-features-external-config-validation]]
==== @ConfigurationProperties Validation
==== @ConfigurationProperties Validation
Spring Boot will attempt to validate `@ConfigurationProperties` classes whenever they
Spring Boot will attempt to validate `@ConfigurationProperties` classes whenever they
annotated with Spring's `@Validated` annotation. You can use JSR-303 `javax.validation`
a
re a
nnotated with Spring's `@Validated` annotation. You can use JSR-303 `javax.validation`
constraint annotations directly on your configuration class. Simply ensure that a
constraint annotations directly on your configuration class. Simply ensure that a
compliant JSR-303 implementation is on your classpath, then add constraint annotations to
compliant JSR-303 implementation is on your classpath, then add constraint annotations to
your fields:
your fields:
...
@@ -5394,7 +5394,7 @@ more `@AutoConfigure...` annotations that can be used to customize auto-configur
...
@@ -5394,7 +5394,7 @@ more `@AutoConfigure...` annotations that can be used to customize auto-configur
settings.
settings.
NOTE: Each slice loads a very restricted set of auto-configuration classes. If you need to
NOTE: Each slice loads a very restricted set of auto-configuration classes. If you need to
exclude one of them, most `@...Test` annotation provide an `excludeAutoConfiguration`
exclude one of them, most `@...Test` annotation
s
provide an `excludeAutoConfiguration`
attribute. Alternatively, you can use `@ImportAutoConfiguration#exclude`.
attribute. Alternatively, you can use `@ImportAutoConfiguration#exclude`.
TIP: It's also possible to use the `@AutoConfigure...` annotations with the standard
TIP: It's also possible to use the `@AutoConfigure...` annotations with the standard
...
@@ -5720,7 +5720,7 @@ for `@Document` classes and configure Spring Data MongoDB repositories. Regular
...
@@ -5720,7 +5720,7 @@ for `@Document` classes and configure Spring Data MongoDB repositories. Regular
In-memory embedded MongoDB generally works well for tests since it is fast and doesn't
In-memory embedded MongoDB generally works well for tests since it is fast and doesn't
require any developer installation. If, however, you prefer to run tests against a real
require any developer installation. If, however, you prefer to run tests against a real
MongoDB server you should exclude the embedded
mongodb
auto-configuration:
MongoDB server you should exclude the embedded
MongoDB
auto-configuration:
[source,java,indent=0]
[source,java,indent=0]
----
----
...
...
spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc
View file @
9b952dd3
...
@@ -1141,7 +1141,7 @@ IDEA suspend the entire VM rather than only suspending the thread that hit the
...
@@ -1141,7 +1141,7 @@ IDEA suspend the entire VM rather than only suspending the thread that hit the
breakpoint. This has the unwanted side-effect of suspending the thread that manages the
breakpoint. This has the unwanted side-effect of suspending the thread that manages the
remote debug tunnel, causing your debugging session to freeze. When using the remote
remote debug tunnel, causing your debugging session to freeze. When using the remote
debug tunnel with IntelliJ IDEA, all breakpoints should be configured to suspend the
debug tunnel with IntelliJ IDEA, all breakpoints should be configured to suspend the
thread rather than the VM. Please se
t
thread rather than the VM. Please se
e
https://youtrack.jetbrains.com/issue/IDEA-165769[IDEA-165769] for further details.
https://youtrack.jetbrains.com/issue/IDEA-165769[IDEA-165769] for further details.
...
...
spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestIntegrationTests.java
View file @
9b952dd3
...
@@ -60,7 +60,7 @@ public class DataMongoTestIntegrationTests {
...
@@ -60,7 +60,7 @@ public class DataMongoTestIntegrationTests {
}
}
@Test
@Test
public
void
didNotInjectExample
Controller
()
{
public
void
didNotInjectExample
Service
()
{
this
.
thrown
.
expect
(
NoSuchBeanDefinitionException
.
class
);
this
.
thrown
.
expect
(
NoSuchBeanDefinitionException
.
class
);
this
.
applicationContext
.
getBean
(
ExampleService
.
class
);
this
.
applicationContext
.
getBean
(
ExampleService
.
class
);
}
}
...
...
spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestWithIncludeFilterIntegrationTests.java
View file @
9b952dd3
...
@@ -39,7 +39,7 @@ public class DataMongoTestWithIncludeFilterIntegrationTests {
...
@@ -39,7 +39,7 @@ public class DataMongoTestWithIncludeFilterIntegrationTests {
private
ExampleService
service
;
private
ExampleService
service
;
@Test
@Test
public
void
test
Repository
()
{
public
void
test
Service
()
{
assertThat
(
this
.
service
.
hasCollection
(
"foobar"
)).
isFalse
();
assertThat
(
this
.
service
.
hasCollection
(
"foobar"
)).
isFalse
();
}
}
...
...
spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/ExampleService.java
View file @
9b952dd3
...
@@ -33,7 +33,7 @@ public class ExampleService {
...
@@ -33,7 +33,7 @@ public class ExampleService {
this
.
mongoTemplate
=
mongoTemplate
;
this
.
mongoTemplate
=
mongoTemplate
;
}
}
public
boolean
hasCollection
(
final
String
collectionName
)
{
public
boolean
hasCollection
(
String
collectionName
)
{
return
this
.
mongoTemplate
.
collectionExists
(
collectionName
);
return
this
.
mongoTemplate
.
collectionExists
(
collectionName
);
}
}
...
...
spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/jdbc/TestDatabaseAutoConfigurationTests.java
View file @
9b952dd3
...
@@ -72,11 +72,11 @@ public class TestDatabaseAutoConfigurationTests {
...
@@ -72,11 +72,11 @@ public class TestDatabaseAutoConfigurationTests {
}
}
}
}
p
ublic
void
load
(
Class
<?>
config
,
String
...
environment
)
{
p
rivate
void
load
(
Class
<?>
config
,
String
...
environment
)
{
this
.
context
=
doLoad
(
config
,
environment
);
this
.
context
=
doLoad
(
config
,
environment
);
}
}
p
ublic
ConfigurableApplicationContext
doLoad
(
Class
<?>
config
,
String
...
environment
)
{
p
rivate
ConfigurableApplicationContext
doLoad
(
Class
<?>
config
,
String
...
environment
)
{
AnnotationConfigApplicationContext
ctx
=
new
AnnotationConfigApplicationContext
();
AnnotationConfigApplicationContext
ctx
=
new
AnnotationConfigApplicationContext
();
if
(
config
!=
null
)
{
if
(
config
!=
null
)
{
ctx
.
register
(
config
);
ctx
.
register
(
config
);
...
...
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