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
47da8a81
Commit
47da8a81
authored
Jan 10, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
26d900f3
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
112 additions
and
66 deletions
+112
-66
howto.md
docs/howto.md
+1
-1
ManagementSecurityAutoConfiguration.java
...te/autoconfigure/ManagementSecurityAutoConfiguration.java
+2
-1
EndpointWebMvcAutoConfigurationTests.java
...e/autoconfigure/EndpointWebMvcAutoConfigurationTests.java
+2
-1
EnvironmentMvcEndpointTests.java
...oot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java
+2
-1
JolokiaEndpointTests.java
...ework/boot/actuate/endpoint/mvc/JolokiaEndpointTests.java
+2
-1
AutoConfigurationSorter.java
...framework/boot/autoconfigure/AutoConfigurationSorter.java
+1
-1
SecurityAutoConfiguration.java
...oot/autoconfigure/security/SecurityAutoConfiguration.java
+2
-1
RabbitAutoconfigurationTests.java
...boot/autoconfigure/amqp/RabbitAutoconfigurationTests.java
+12
-7
AopAutoConfigurationTests.java
...ork/boot/autoconfigure/aop/AopAutoConfigurationTests.java
+4
-2
TomcatDataSourceConfigurationTests.java
...utoconfigure/jdbc/TomcatDataSourceConfigurationTests.java
+2
-1
JmsTemplateAutoConfigurationTests.java
.../autoconfigure/jms/JmsTemplateAutoConfigurationTests.java
+6
-3
HibernateJpaAutoConfigurationTests.java
...configure/orm/jpa/HibernateJpaAutoConfigurationTests.java
+3
-2
ServerPropertiesAutoConfigurationTests.java
...configure/web/ServerPropertiesAutoConfigurationTests.java
+2
-2
InitCommand.java
...ava/org/springframework/boot/cli/command/InitCommand.java
+2
-2
TestRunner.java
...a/org/springframework/boot/cli/testrunner/TestRunner.java
+2
-1
SampleSecureApplication.java
.../src/main/java/sample/secure/SampleSecureApplication.java
+2
-1
SampleService.java
...ple-secure/src/main/java/sample/secure/SampleService.java
+2
-2
SampleServletApplication.java
...rc/main/java/sample/servlet/SampleServletApplication.java
+1
-1
logback.xml
.../spring-boot-sample-web-ui/src/main/resources/logback.xml
+3
-3
PropertiesLauncher.java
...a/org/springframework/boot/loader/PropertiesLauncher.java
+35
-17
EnvironmentDelegateApplicationListener.java
...text/listener/EnvironmentDelegateApplicationListener.java
+1
-0
ContextIdApplicationContextInitializerTests.java
...tializer/ContextIdApplicationContextInitializerTests.java
+5
-3
EnvironmentDelegateApplicationContextInitializerTests.java
...nvironmentDelegateApplicationContextInitializerTests.java
+4
-5
FileEncodingApplicationListenerTests.java
...ontext/listener/FileEncodingApplicationListenerTests.java
+6
-3
LoggingApplicationListenerTests.java
...oot/context/listener/LoggingApplicationListenerTests.java
+2
-1
EnableConfigurationPropertiesTests.java
...ontext/properties/EnableConfigurationPropertiesTests.java
+6
-3
No files found.
docs/howto.md
View file @
47da8a81
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementSecurityAutoConfiguration.java
View file @
47da8a81
...
@@ -128,7 +128,8 @@ public class ManagementSecurityAutoConfiguration {
...
@@ -128,7 +128,8 @@ public class ManagementSecurityAutoConfiguration {
IgnoredRequestConfigurer
ignoring
=
builder
.
ignoring
();
IgnoredRequestConfigurer
ignoring
=
builder
.
ignoring
();
// The ignores are not cumulative, so to prevent overwriting the defaults we
// The ignores are not cumulative, so to prevent overwriting the defaults we
// add them back.
// add them back.
List
<
String
>
ignored
=
SpringBootWebSecurityConfiguration
.
getIgnored
(
this
.
security
);
List
<
String
>
ignored
=
SpringBootWebSecurityConfiguration
.
getIgnored
(
this
.
security
);
ignored
.
addAll
(
Arrays
.
asList
(
getEndpointPaths
(
this
.
endpointHandlerMapping
,
ignored
.
addAll
(
Arrays
.
asList
(
getEndpointPaths
(
this
.
endpointHandlerMapping
,
false
)));
false
)));
if
(!
this
.
management
.
getSecurity
().
isEnabled
())
{
if
(!
this
.
management
.
getSecurity
().
isEnabled
())
{
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfigurationTests.java
View file @
47da8a81
...
@@ -142,7 +142,8 @@ public class EndpointWebMvcAutoConfigurationTests {
...
@@ -142,7 +142,8 @@ public class EndpointWebMvcAutoConfigurationTests {
@Test
@Test
public
void
contextPath
()
throws
Exception
{
public
void
contextPath
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
applicationContext
,
"management.contextPath:/test"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
applicationContext
,
"management.contextPath:/test"
);
this
.
applicationContext
.
register
(
RootConfig
.
class
,
this
.
applicationContext
.
register
(
RootConfig
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
,
ManagementServerPropertiesAutoConfiguration
.
class
,
ManagementServerPropertiesAutoConfiguration
.
class
,
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java
View file @
47da8a81
...
@@ -59,7 +59,8 @@ public class EnvironmentMvcEndpointTests {
...
@@ -59,7 +59,8 @@ public class EnvironmentMvcEndpointTests {
@Before
@Before
public
void
setUp
()
{
public
void
setUp
()
{
this
.
mvc
=
MockMvcBuilders
.
webAppContextSetup
(
this
.
context
).
build
();
this
.
mvc
=
MockMvcBuilders
.
webAppContextSetup
(
this
.
context
).
build
();
EnvironmentTestUtils
.
addEnvironment
((
ConfigurableApplicationContext
)
this
.
context
,
"foo:bar"
);
EnvironmentTestUtils
.
addEnvironment
(
(
ConfigurableApplicationContext
)
this
.
context
,
"foo:bar"
);
}
}
@Test
@Test
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaEndpointTests.java
View file @
47da8a81
...
@@ -66,7 +66,8 @@ public class JolokiaEndpointTests {
...
@@ -66,7 +66,8 @@ public class JolokiaEndpointTests {
@Before
@Before
public
void
setUp
()
{
public
void
setUp
()
{
this
.
mvc
=
MockMvcBuilders
.
webAppContextSetup
(
this
.
context
).
build
();
this
.
mvc
=
MockMvcBuilders
.
webAppContextSetup
(
this
.
context
).
build
();
EnvironmentTestUtils
.
addEnvironment
((
ConfigurableApplicationContext
)
this
.
context
,
"foo:bar"
);
EnvironmentTestUtils
.
addEnvironment
(
(
ConfigurableApplicationContext
)
this
.
context
,
"foo:bar"
);
}
}
@Test
@Test
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationSorter.java
View file @
47da8a81
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
*/
*/
package
org
.
springframework
.
boot
.
autoconfigure
;
package
org
.
springframework
.
boot
.
autoconfigure
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -37,7 +38,6 @@ import org.springframework.core.type.classreading.MetadataReader;
...
@@ -37,7 +38,6 @@ import org.springframework.core.type.classreading.MetadataReader;
import
org.springframework.core.type.classreading.MetadataReaderFactory
;
import
org.springframework.core.type.classreading.MetadataReaderFactory
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
/**
/**
* Sort {@link EnableAutoConfiguration auto-configuration} classes into priority order by
* Sort {@link EnableAutoConfiguration auto-configuration} classes into priority order by
* reading {@link Ordered} and {@link AutoConfigureAfter} annotations (without loading
* reading {@link Ordered} and {@link AutoConfigureAfter} annotations (without loading
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfiguration.java
View file @
47da8a81
...
@@ -27,7 +27,8 @@ import org.springframework.security.authentication.AuthenticationManager;
...
@@ -27,7 +27,8 @@ import org.springframework.security.authentication.AuthenticationManager;
@Configuration
@Configuration
@ConditionalOnClass
(
AuthenticationManager
.
class
)
@ConditionalOnClass
(
AuthenticationManager
.
class
)
@EnableConfigurationProperties
@EnableConfigurationProperties
@Import
({
SpringBootWebSecurityConfiguration
.
class
,
AuthenticationManagerConfiguration
.
class
})
@Import
({
SpringBootWebSecurityConfiguration
.
class
,
AuthenticationManagerConfiguration
.
class
})
public
class
SecurityAutoConfiguration
{
public
class
SecurityAutoConfiguration
{
@Bean
(
name
=
"org.springframework.autoconfigure.security.SecurityProperties"
)
@Bean
(
name
=
"org.springframework.autoconfigure.security.SecurityProperties"
)
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitAutoconfigurationTests.java
View file @
47da8a81
...
@@ -65,9 +65,10 @@ public class RabbitAutoconfigurationTests {
...
@@ -65,9 +65,10 @@ public class RabbitAutoconfigurationTests {
public
void
testRabbitTemplateWithOverrides
()
{
public
void
testRabbitTemplateWithOverrides
()
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.host:remote-server"
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.port:9000"
,
"spring.rabbitmq.username:alice"
,
"spring.rabbitmq.host:remote-server"
,
"spring.rabbitmq.port:9000"
,
"spring.rabbitmq.password:secret"
,
"spring.rabbitmq.virtual_host:/vhost"
);
"spring.rabbitmq.username:alice"
,
"spring.rabbitmq.password:secret"
,
"spring.rabbitmq.virtual_host:/vhost"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
CachingConnectionFactory
connectionFactory
=
this
.
context
CachingConnectionFactory
connectionFactory
=
this
.
context
.
getBean
(
CachingConnectionFactory
.
class
);
.
getBean
(
CachingConnectionFactory
.
class
);
...
@@ -80,7 +81,8 @@ public class RabbitAutoconfigurationTests {
...
@@ -80,7 +81,8 @@ public class RabbitAutoconfigurationTests {
public
void
testRabbitTemplateEmptyVirtualHost
()
{
public
void
testRabbitTemplateEmptyVirtualHost
()
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.virtual_host:"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.virtual_host:"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
CachingConnectionFactory
connectionFactory
=
this
.
context
CachingConnectionFactory
connectionFactory
=
this
.
context
.
getBean
(
CachingConnectionFactory
.
class
);
.
getBean
(
CachingConnectionFactory
.
class
);
...
@@ -91,7 +93,8 @@ public class RabbitAutoconfigurationTests {
...
@@ -91,7 +93,8 @@ public class RabbitAutoconfigurationTests {
public
void
testRabbitTemplateVirtualHostMissingSlash
()
{
public
void
testRabbitTemplateVirtualHostMissingSlash
()
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.virtual_host:foo"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.virtual_host:foo"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
CachingConnectionFactory
connectionFactory
=
this
.
context
CachingConnectionFactory
connectionFactory
=
this
.
context
.
getBean
(
CachingConnectionFactory
.
class
);
.
getBean
(
CachingConnectionFactory
.
class
);
...
@@ -102,7 +105,8 @@ public class RabbitAutoconfigurationTests {
...
@@ -102,7 +105,8 @@ public class RabbitAutoconfigurationTests {
public
void
testRabbitTemplateDefaultVirtualHost
()
{
public
void
testRabbitTemplateDefaultVirtualHost
()
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.virtual_host:/"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.virtual_host:/"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
CachingConnectionFactory
connectionFactory
=
this
.
context
CachingConnectionFactory
connectionFactory
=
this
.
context
.
getBean
(
CachingConnectionFactory
.
class
);
.
getBean
(
CachingConnectionFactory
.
class
);
...
@@ -126,7 +130,8 @@ public class RabbitAutoconfigurationTests {
...
@@ -126,7 +130,8 @@ public class RabbitAutoconfigurationTests {
public
void
testStaticQueues
()
{
public
void
testStaticQueues
()
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
this
.
context
.
register
(
TestConfiguration
.
class
,
RabbitAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.dynamic:false"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.rabbitmq.dynamic:false"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
// There should NOT be an AmqpAdmin bean when dynamic is switch to false
// There should NOT be an AmqpAdmin bean when dynamic is switch to false
this
.
thrown
.
expect
(
NoSuchBeanDefinitionException
.
class
);
this
.
thrown
.
expect
(
NoSuchBeanDefinitionException
.
class
);
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/aop/AopAutoConfigurationTests.java
View file @
47da8a81
...
@@ -56,7 +56,8 @@ public class AopAutoConfigurationTests {
...
@@ -56,7 +56,8 @@ public class AopAutoConfigurationTests {
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
TestConfiguration
.
class
,
AopAutoConfiguration
.
class
,
this
.
context
.
register
(
TestConfiguration
.
class
,
AopAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
);
PropertyPlaceholderAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.aop.proxyTargetClass:true"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.aop.proxyTargetClass:true"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
TestAspect
aspect
=
this
.
context
.
getBean
(
TestAspect
.
class
);
TestAspect
aspect
=
this
.
context
.
getBean
(
TestAspect
.
class
);
assertFalse
(
aspect
.
isCalled
());
assertFalse
(
aspect
.
isCalled
());
...
@@ -70,7 +71,8 @@ public class AopAutoConfigurationTests {
...
@@ -70,7 +71,8 @@ public class AopAutoConfigurationTests {
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
TestConfiguration
.
class
,
AopAutoConfiguration
.
class
,
this
.
context
.
register
(
TestConfiguration
.
class
,
AopAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
);
PropertyPlaceholderAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.aop.proxyTargetClass:false"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.aop.proxyTargetClass:false"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
TestAspect
aspect
=
this
.
context
.
getBean
(
TestAspect
.
class
);
TestAspect
aspect
=
this
.
context
.
getBean
(
TestAspect
.
class
);
assertFalse
(
aspect
.
isCalled
());
assertFalse
(
aspect
.
isCalled
());
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/TomcatDataSourceConfigurationTests.java
View file @
47da8a81
...
@@ -56,7 +56,8 @@ public class TomcatDataSourceConfigurationTests {
...
@@ -56,7 +56,8 @@ public class TomcatDataSourceConfigurationTests {
@Test
@Test
public
void
testDataSourcePropertiesOverridden
()
throws
Exception
{
public
void
testDataSourcePropertiesOverridden
()
throws
Exception
{
this
.
context
.
register
(
TomcatDataSourceConfiguration
.
class
);
this
.
context
.
register
(
TomcatDataSourceConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.datasource.url:jdbc:foo//bar/spam"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.datasource.url:jdbc:foo//bar/spam"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertEquals
(
"jdbc:foo//bar/spam"
,
assertEquals
(
"jdbc:foo//bar/spam"
,
this
.
context
.
getBean
(
org
.
apache
.
tomcat
.
jdbc
.
pool
.
DataSource
.
class
)
this
.
context
.
getBean
(
org
.
apache
.
tomcat
.
jdbc
.
pool
.
DataSource
.
class
)
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/JmsTemplateAutoConfigurationTests.java
View file @
47da8a81
...
@@ -118,7 +118,8 @@ public class JmsTemplateAutoConfigurationTests {
...
@@ -118,7 +118,8 @@ public class JmsTemplateAutoConfigurationTests {
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
this
.
context
.
register
(
TestConfiguration
.
class
,
JmsTemplateAutoConfiguration
.
class
);
.
register
(
TestConfiguration
.
class
,
JmsTemplateAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.jms.pubSubDomain:false"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.jms.pubSubDomain:false"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
JmsTemplate
jmsTemplate
=
this
.
context
.
getBean
(
JmsTemplate
.
class
);
JmsTemplate
jmsTemplate
=
this
.
context
.
getBean
(
JmsTemplate
.
class
);
ActiveMQConnectionFactory
connectionFactory
=
this
.
context
ActiveMQConnectionFactory
connectionFactory
=
this
.
context
...
@@ -134,7 +135,8 @@ public class JmsTemplateAutoConfigurationTests {
...
@@ -134,7 +135,8 @@ public class JmsTemplateAutoConfigurationTests {
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
this
.
context
.
register
(
TestConfiguration
.
class
,
JmsTemplateAutoConfiguration
.
class
);
.
register
(
TestConfiguration
.
class
,
JmsTemplateAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.activemq.inMemory:false"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.activemq.inMemory:false"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
JmsTemplate
jmsTemplate
=
this
.
context
.
getBean
(
JmsTemplate
.
class
);
JmsTemplate
jmsTemplate
=
this
.
context
.
getBean
(
JmsTemplate
.
class
);
ActiveMQConnectionFactory
connectionFactory
=
this
.
context
ActiveMQConnectionFactory
connectionFactory
=
this
.
context
...
@@ -153,7 +155,8 @@ public class JmsTemplateAutoConfigurationTests {
...
@@ -153,7 +155,8 @@ public class JmsTemplateAutoConfigurationTests {
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
this
.
context
.
register
(
TestConfiguration
.
class
,
JmsTemplateAutoConfiguration
.
class
);
.
register
(
TestConfiguration
.
class
,
JmsTemplateAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.activemq.inMemory:false"
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.activemq.inMemory:false"
,
"spring.activemq.brokerURL:tcp://remote-host:10000"
);
"spring.activemq.brokerURL:tcp://remote-host:10000"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
JmsTemplate
jmsTemplate
=
this
.
context
.
getBean
(
JmsTemplate
.
class
);
JmsTemplate
jmsTemplate
=
this
.
context
.
getBean
(
JmsTemplate
.
class
);
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfigurationTests.java
View file @
47da8a81
...
@@ -38,7 +38,8 @@ public class HibernateJpaAutoConfigurationTests extends AbstractJpaAutoConfigura
...
@@ -38,7 +38,8 @@ public class HibernateJpaAutoConfigurationTests extends AbstractJpaAutoConfigura
@Test
@Test
public
void
testCustomNamingStrategy
()
throws
Exception
{
public
void
testCustomNamingStrategy
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.jpa.hibernate.namingstrategy:"
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"spring.jpa.hibernate.namingstrategy:"
+
"org.hibernate.cfg.EJB3NamingStrategy"
);
+
"org.hibernate.cfg.EJB3NamingStrategy"
);
setupTestConfiguration
();
setupTestConfiguration
();
this
.
context
.
refresh
();
this
.
context
.
refresh
();
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfigurationTests.java
View file @
47da8a81
...
@@ -86,8 +86,8 @@ public class ServerPropertiesAutoConfigurationTests {
...
@@ -86,8 +86,8 @@ public class ServerPropertiesAutoConfigurationTests {
this
.
context
=
new
AnnotationConfigEmbeddedWebApplicationContext
();
this
.
context
=
new
AnnotationConfigEmbeddedWebApplicationContext
();
this
.
context
.
register
(
Config
.
class
,
ServerPropertiesAutoConfiguration
.
class
,
this
.
context
.
register
(
Config
.
class
,
ServerPropertiesAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
);
PropertyPlaceholderAutoConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"server.tomcat.basedir:target/foo"
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"server.port:9000"
);
"server.
tomcat.basedir:target/foo"
,
"server.
port:9000"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
ServerProperties
server
=
this
.
context
.
getBean
(
ServerProperties
.
class
);
ServerProperties
server
=
this
.
context
.
getBean
(
ServerProperties
.
class
);
assertNotNull
(
server
);
assertNotNull
(
server
);
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/InitCommand.java
View file @
47da8a81
...
@@ -75,8 +75,8 @@ public class InitCommand extends OptionParsingCommand {
...
@@ -75,8 +75,8 @@ public class InitCommand extends OptionParsingCommand {
ClassLoader
loader
=
Thread
.
currentThread
().
getContextClassLoader
();
ClassLoader
loader
=
Thread
.
currentThread
().
getContextClassLoader
();
boolean
enhanced
=
false
;
boolean
enhanced
=
false
;
SourceOptions
sourceOptions
=
new
SourceOptions
(
options
,
loader
,
"init.groovy"
,
SourceOptions
sourceOptions
=
new
SourceOptions
(
options
,
loader
,
"spring.groovy"
);
"
init.groovy"
,
"
spring.groovy"
);
String
[]
sources
=
sourceOptions
.
getSourcesArray
();
String
[]
sources
=
sourceOptions
.
getSourcesArray
();
if
(!(
loader
instanceof
GroovyClassLoader
))
{
if
(!(
loader
instanceof
GroovyClassLoader
))
{
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/testrunner/TestRunner.java
View file @
47da8a81
...
@@ -43,7 +43,8 @@ public class TestRunner {
...
@@ -43,7 +43,8 @@ public class TestRunner {
* @param sources
* @param sources
* @param args
* @param args
*/
*/
public
TestRunner
(
TestRunnerConfiguration
configuration
,
String
[]
sources
,
String
[]
args
)
{
public
TestRunner
(
TestRunnerConfiguration
configuration
,
String
[]
sources
,
String
[]
args
)
{
this
.
sources
=
sources
.
clone
();
this
.
sources
=
sources
.
clone
();
this
.
compiler
=
new
GroovyCompiler
(
configuration
);
this
.
compiler
=
new
GroovyCompiler
(
configuration
);
}
}
...
...
spring-boot-samples/spring-boot-sample-secure/src/main/java/sample/secure/SampleSecureApplication.java
View file @
47da8a81
...
@@ -41,7 +41,8 @@ public class SampleSecureApplication implements CommandLineRunner {
...
@@ -41,7 +41,8 @@ public class SampleSecureApplication implements CommandLineRunner {
.
commaSeparatedStringToAuthorityList
(
"ROLE_USER"
)));
.
commaSeparatedStringToAuthorityList
(
"ROLE_USER"
)));
try
{
try
{
System
.
out
.
println
(
service
.
secure
());
System
.
out
.
println
(
service
.
secure
());
}
finally
{
}
finally
{
SecurityContextHolder
.
clearContext
();
SecurityContextHolder
.
clearContext
();
}
}
}
}
...
...
spring-boot-samples/spring-boot-sample-secure/src/main/java/sample/secure/SampleService.java
View file @
47da8a81
spring-boot-samples/spring-boot-sample-servlet/src/main/java/sample/servlet/SampleServletApplication.java
View file @
47da8a81
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/logback.xml
View file @
47da8a81
spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java
View file @
47da8a81
...
@@ -74,6 +74,7 @@ import org.springframework.boot.loader.util.SystemPropertyUtils;
...
@@ -74,6 +74,7 @@ import org.springframework.boot.loader.util.SystemPropertyUtils;
* </ul>
* </ul>
*
*
* @author Dave Syer
* @author Dave Syer
* @author Janne Valkealahti
*/
*/
public
class
PropertiesLauncher
extends
Launcher
{
public
class
PropertiesLauncher
extends
Launcher
{
...
@@ -326,25 +327,37 @@ public class PropertiesLauncher extends Launcher {
...
@@ -326,25 +327,37 @@ public class PropertiesLauncher extends Launcher {
@Override
@Override
protected
ClassLoader
createClassLoader
(
List
<
Archive
>
archives
)
throws
Exception
{
protected
ClassLoader
createClassLoader
(
List
<
Archive
>
archives
)
throws
Exception
{
ClassLoader
loader
=
super
.
createClassLoader
(
archives
);
ClassLoader
loader
=
super
.
createClassLoader
(
archives
);
String
classLoaderType
=
getProperty
(
"loader.classLoader"
);
String
customLoaderClassName
=
getProperty
(
"loader.classLoader"
);
if
(
classLoaderType
!=
null
)
{
if
(
customLoaderClassName
!=
null
)
{
Class
<?>
type
=
Class
.
forName
(
classLoaderType
,
true
,
loader
);
loader
=
wrapWithCustomClassLoader
(
loader
,
customLoaderClassName
);
this
.
logger
.
info
(
"Using custom class loader: "
+
customLoaderClassName
);
}
return
loader
;
}
@SuppressWarnings
(
"unchecked"
)
private
ClassLoader
wrapWithCustomClassLoader
(
ClassLoader
parent
,
String
loaderClassName
)
throws
Exception
{
Class
<
ClassLoader
>
loaderClass
=
(
Class
<
ClassLoader
>)
Class
.
forName
(
loaderClassName
,
true
,
parent
);
try
{
try
{
loader
=
(
ClassLoader
)
type
.
getConstructor
(
ClassLoader
.
class
)
return
loaderClass
.
getConstructor
(
ClassLoader
.
class
).
newInstance
(
parent
);
.
newInstance
(
loader
);
}
}
catch
(
NoSuchMethodException
e
)
{
catch
(
NoSuchMethodException
e
)
{
// Ignore and try with URLs
}
try
{
try
{
loader
=
(
ClassLoader
)
type
.
getConstructor
(
URL
[].
class
,
return
loaderClass
.
getConstructor
(
URL
[].
class
,
ClassLoader
.
class
)
ClassLoader
.
class
).
newInstance
(
new
URL
[
0
],
loader
);
.
newInstance
(
new
URL
[
0
],
parent
);
}
}
catch
(
NoSuchMethodException
ex
)
{
catch
(
NoSuchMethodException
ex
)
{
loader
=
(
ClassLoader
)
type
.
newInstance
();
// Ignore and try without any arguments
}
}
}
this
.
logger
.
info
(
"Using custom class loader: "
+
classLoaderType
);
return
loaderClass
.
newInstance
();
}
return
loader
;
}
}
private
String
getProperty
(
String
propertyKey
)
throws
Exception
{
private
String
getProperty
(
String
propertyKey
)
throws
Exception
{
...
@@ -356,18 +369,21 @@ public class PropertiesLauncher extends Launcher {
...
@@ -356,18 +369,21 @@ public class PropertiesLauncher extends Launcher {
manifestKey
=
propertyKey
.
replace
(
"."
,
"-"
);
manifestKey
=
propertyKey
.
replace
(
"."
,
"-"
);
manifestKey
=
toCamelCase
(
manifestKey
);
manifestKey
=
toCamelCase
(
manifestKey
);
}
}
String
property
=
SystemPropertyUtils
.
getProperty
(
propertyKey
);
String
property
=
SystemPropertyUtils
.
getProperty
(
propertyKey
);
if
(
property
!=
null
)
{
if
(
property
!=
null
)
{
String
value
=
SystemPropertyUtils
.
resolvePlaceholders
(
property
);
String
value
=
SystemPropertyUtils
.
resolvePlaceholders
(
property
);
this
.
logger
.
fine
(
"Property '"
+
propertyKey
+
"' from environment: "
+
value
);
this
.
logger
.
fine
(
"Property '"
+
propertyKey
+
"' from environment: "
+
value
);
return
value
;
return
value
;
}
}
if
(
this
.
properties
.
containsKey
(
propertyKey
))
{
if
(
this
.
properties
.
containsKey
(
propertyKey
))
{
String
value
=
SystemPropertyUtils
.
resolvePlaceholders
(
this
.
properties
String
value
=
SystemPropertyUtils
.
resolvePlaceholders
(
this
.
properties
.
getProperty
(
propertyKey
));
.
getProperty
(
propertyKey
));
this
.
logger
.
fine
(
"Property '"
+
propertyKey
+
"' from properties: "
+
value
);
this
.
logger
.
fine
(
"Property '"
+
propertyKey
+
"' from properties: "
+
value
);
return
value
;
return
value
;
}
}
try
{
try
{
// Prefer home dir for MANIFEST if there is one
// Prefer home dir for MANIFEST if there is one
Manifest
manifest
=
new
ExplodedArchive
(
this
.
home
).
getManifest
();
Manifest
manifest
=
new
ExplodedArchive
(
this
.
home
).
getManifest
();
...
@@ -379,7 +395,9 @@ public class PropertiesLauncher extends Launcher {
...
@@ -379,7 +395,9 @@ public class PropertiesLauncher extends Launcher {
}
}
}
}
catch
(
IllegalStateException
ex
)
{
catch
(
IllegalStateException
ex
)
{
// Ignore
}
}
// Otherwise try the parent archive
// Otherwise try the parent archive
Manifest
manifest
=
createArchive
().
getManifest
();
Manifest
manifest
=
createArchive
().
getManifest
();
if
(
manifest
!=
null
)
{
if
(
manifest
!=
null
)
{
...
...
spring-boot/src/main/java/org/springframework/boot/context/listener/EnvironmentDelegateApplicationListener.java
View file @
47da8a81
...
@@ -50,6 +50,7 @@ public class EnvironmentDelegateApplicationListener implements
...
@@ -50,6 +50,7 @@ public class EnvironmentDelegateApplicationListener implements
private
SimpleApplicationEventMulticaster
multicaster
;
private
SimpleApplicationEventMulticaster
multicaster
;
@Override
public
void
onApplicationEvent
(
ApplicationEvent
event
)
{
public
void
onApplicationEvent
(
ApplicationEvent
event
)
{
if
(
event
instanceof
SpringApplicationEnvironmentAvailableEvent
)
{
if
(
event
instanceof
SpringApplicationEnvironmentAvailableEvent
)
{
List
<
ApplicationListener
<
ApplicationEvent
>>
delegates
=
getListeners
(((
SpringApplicationEnvironmentAvailableEvent
)
event
)
List
<
ApplicationListener
<
ApplicationEvent
>>
delegates
=
getListeners
(((
SpringApplicationEnvironmentAvailableEvent
)
event
)
...
...
spring-boot/src/test/java/org/springframework/boot/context/initializer/ContextIdApplicationContextInitializerTests.java
View file @
47da8a81
...
@@ -42,7 +42,8 @@ public class ContextIdApplicationContextInitializerTests {
...
@@ -42,7 +42,8 @@ public class ContextIdApplicationContextInitializerTests {
@Test
@Test
public
void
testNameAndPort
()
{
public
void
testNameAndPort
()
{
ConfigurableApplicationContext
context
=
new
AnnotationConfigApplicationContext
();
ConfigurableApplicationContext
context
=
new
AnnotationConfigApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
context
,
"spring.application.name:foo"
,
"PORT:8080"
);
EnvironmentTestUtils
.
addEnvironment
(
context
,
"spring.application.name:foo"
,
"PORT:8080"
);
this
.
initializer
.
initialize
(
context
);
this
.
initializer
.
initialize
(
context
);
assertEquals
(
"foo:8080"
,
context
.
getId
());
assertEquals
(
"foo:8080"
,
context
.
getId
());
}
}
...
@@ -59,8 +60,9 @@ public class ContextIdApplicationContextInitializerTests {
...
@@ -59,8 +60,9 @@ public class ContextIdApplicationContextInitializerTests {
@Test
@Test
public
void
testCloudFoundry
()
{
public
void
testCloudFoundry
()
{
ConfigurableApplicationContext
context
=
new
AnnotationConfigApplicationContext
();
ConfigurableApplicationContext
context
=
new
AnnotationConfigApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
context
,
"spring.config.name:foo"
,
"PORT:8080"
,
EnvironmentTestUtils
.
addEnvironment
(
context
,
"spring.config.name:foo"
,
"vcap.application.name:bar"
,
"vcap.application.instance_index:2"
);
"PORT:8080"
,
"vcap.application.name:bar"
,
"vcap.application.instance_index:2"
);
this
.
initializer
.
initialize
(
context
);
this
.
initializer
.
initialize
(
context
);
assertEquals
(
"bar:2"
,
context
.
getId
());
assertEquals
(
"bar:2"
,
context
.
getId
());
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/context/initializer/EnvironmentDelegateApplicationContextInitializerTests.java
View file @
47da8a81
...
@@ -46,9 +46,8 @@ public class EnvironmentDelegateApplicationContextInitializerTests {
...
@@ -46,9 +46,8 @@ public class EnvironmentDelegateApplicationContextInitializerTests {
@Test
@Test
public
void
orderedInitialize
()
throws
Exception
{
public
void
orderedInitialize
()
throws
Exception
{
StaticApplicationContext
context
=
new
StaticApplicationContext
();
StaticApplicationContext
context
=
new
StaticApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
context
,
EnvironmentTestUtils
.
addEnvironment
(
context
,
"context.initializer.classes:"
"context.initializer.classes:"
+
MockInitB
.
class
.
getName
()
+
","
+
MockInitB
.
class
.
getName
()
+
","
+
MockInitA
.
class
.
getName
());
+
MockInitA
.
class
.
getName
());
this
.
initializer
.
initialize
(
context
);
this
.
initializer
.
initialize
(
context
);
assertThat
(
context
.
getBeanFactory
().
getSingleton
(
"a"
),
equalTo
((
Object
)
"a"
));
assertThat
(
context
.
getBeanFactory
().
getSingleton
(
"a"
),
equalTo
((
Object
)
"a"
));
assertThat
(
context
.
getBeanFactory
().
getSingleton
(
"b"
),
equalTo
((
Object
)
"b"
));
assertThat
(
context
.
getBeanFactory
().
getSingleton
(
"b"
),
equalTo
((
Object
)
"b"
));
...
@@ -79,8 +78,8 @@ public class EnvironmentDelegateApplicationContextInitializerTests {
...
@@ -79,8 +78,8 @@ public class EnvironmentDelegateApplicationContextInitializerTests {
@Test
@Test
public
void
notAnInitializerClass
()
throws
Exception
{
public
void
notAnInitializerClass
()
throws
Exception
{
StaticApplicationContext
context
=
new
StaticApplicationContext
();
StaticApplicationContext
context
=
new
StaticApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
context
,
EnvironmentTestUtils
.
addEnvironment
(
context
,
"context.initializer.classes:"
"context.initializer.classes:"
+
Object
.
class
.
getName
());
+
Object
.
class
.
getName
());
this
.
thrown
.
expect
(
IllegalArgumentException
.
class
);
this
.
thrown
.
expect
(
IllegalArgumentException
.
class
);
this
.
initializer
.
initialize
(
context
);
this
.
initializer
.
initialize
(
context
);
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/context/listener/FileEncodingApplicationListenerTests.java
View file @
47da8a81
...
@@ -25,6 +25,8 @@ import org.springframework.core.env.ConfigurableEnvironment;
...
@@ -25,6 +25,8 @@ import org.springframework.core.env.ConfigurableEnvironment;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.core.env.StandardEnvironment
;
/**
/**
* Tests for {@link FileEncodingApplicationListener}.
*
* @author Dave Syer
* @author Dave Syer
*/
*/
public
class
FileEncodingApplicationListenerTests
{
public
class
FileEncodingApplicationListenerTests
{
...
@@ -36,7 +38,8 @@ public class FileEncodingApplicationListenerTests {
...
@@ -36,7 +38,8 @@ public class FileEncodingApplicationListenerTests {
@Test
(
expected
=
IllegalStateException
.
class
)
@Test
(
expected
=
IllegalStateException
.
class
)
public
void
testIllegalState
()
{
public
void
testIllegalState
()
{
EnvironmentTestUtils
.
addEnviroment
(
this
.
environment
,
"spring.mandatory_file_encoding:FOO"
);
EnvironmentTestUtils
.
addEnviroment
(
this
.
environment
,
"spring.mandatory_file_encoding:FOO"
);
this
.
initializer
.
onApplicationEvent
(
this
.
event
);
this
.
initializer
.
onApplicationEvent
(
this
.
event
);
}
}
...
@@ -48,8 +51,8 @@ public class FileEncodingApplicationListenerTests {
...
@@ -48,8 +51,8 @@ public class FileEncodingApplicationListenerTests {
@Test
@Test
public
void
testSunnyDayMandated
()
{
public
void
testSunnyDayMandated
()
{
Assume
.
assumeNotNull
(
System
.
getProperty
(
"file.encoding"
));
Assume
.
assumeNotNull
(
System
.
getProperty
(
"file.encoding"
));
EnvironmentTestUtils
.
addEnviroment
(
this
.
environment
,
"spring.mandatory_file_encoding:"
EnvironmentTestUtils
.
addEnviroment
(
this
.
environment
,
+
System
.
getProperty
(
"file.encoding"
));
"spring.mandatory_file_encoding:"
+
System
.
getProperty
(
"file.encoding"
));
this
.
initializer
.
onApplicationEvent
(
this
.
event
);
this
.
initializer
.
onApplicationEvent
(
this
.
event
);
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/context/listener/LoggingApplicationListenerTests.java
View file @
47da8a81
...
@@ -108,7 +108,8 @@ public class LoggingApplicationListenerTests {
...
@@ -108,7 +108,8 @@ public class LoggingApplicationListenerTests {
@Test
@Test
public
void
testOverrideConfigDoesNotExist
()
throws
Exception
{
public
void
testOverrideConfigDoesNotExist
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"logging.config: doesnotexist.xml"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"logging.config: doesnotexist.xml"
);
this
.
initializer
.
initialize
(
this
.
context
.
getEnvironment
(),
this
.
initializer
.
initialize
(
this
.
context
.
getEnvironment
(),
this
.
context
.
getClassLoader
());
this
.
context
.
getClassLoader
());
// Should not throw
// Should not throw
...
...
spring-boot/src/test/java/org/springframework/boot/context/properties/EnableConfigurationPropertiesTests.java
View file @
47da8a81
...
@@ -184,7 +184,8 @@ public class EnableConfigurationPropertiesTests {
...
@@ -184,7 +184,8 @@ public class EnableConfigurationPropertiesTests {
@Test
@Test
public
void
testCollectionPropertiesBindingFromYamlArray
()
{
public
void
testCollectionPropertiesBindingFromYamlArray
()
{
this
.
context
.
register
(
TestConfiguration
.
class
);
this
.
context
.
register
(
TestConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"name:foo"
,
"list[0]:1"
,
"list[1]:2"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"name:foo"
,
"list[0]:1"
,
"list[1]:2"
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertEquals
(
2
,
this
.
context
.
getBean
(
TestProperties
.
class
).
getList
().
size
());
assertEquals
(
2
,
this
.
context
.
getBean
(
TestProperties
.
class
).
getList
().
size
());
}
}
...
@@ -227,7 +228,8 @@ public class EnableConfigurationPropertiesTests {
...
@@ -227,7 +228,8 @@ public class EnableConfigurationPropertiesTests {
@Test
@Test
public
void
testBindingDirectlyToFileResolvedFromEnvironment
()
{
public
void
testBindingDirectlyToFileResolvedFromEnvironment
()
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"binding.location:classpath:other.yml"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"binding.location:classpath:other.yml"
);
this
.
context
.
register
(
ResourceBindingProperties
.
class
,
TestConfiguration
.
class
);
this
.
context
.
register
(
ResourceBindingProperties
.
class
,
TestConfiguration
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertEquals
(
1
,
assertEquals
(
1
,
...
@@ -317,7 +319,8 @@ public class EnableConfigurationPropertiesTests {
...
@@ -317,7 +319,8 @@ public class EnableConfigurationPropertiesTests {
@Test
@Test
public
void
testMultipleExplicitTypes
()
throws
Exception
{
public
void
testMultipleExplicitTypes
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"external.name:foo"
,
"another.name:bar"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"external.name:foo"
,
"another.name:bar"
);
this
.
context
.
register
(
FurtherExampleConfig
.
class
);
this
.
context
.
register
(
FurtherExampleConfig
.
class
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
assertEquals
(
"foo"
,
this
.
context
.
getBean
(
External
.
class
).
getName
());
assertEquals
(
"foo"
,
this
.
context
.
getBean
(
External
.
class
).
getName
());
...
...
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