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
16d61f84
Commit
16d61f84
authored
Mar 25, 2015
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'spring-framework-4.2'
parents
ca4e85cb
bc99ad21
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
75 additions
and
19 deletions
+75
-19
AutoConfigurationSorter.java
...framework/boot/autoconfigure/AutoConfigurationSorter.java
+1
-2
AutoConfigureOrder.java
...pringframework/boot/autoconfigure/AutoConfigureOrder.java
+47
-0
MessageSourceAutoConfiguration.java
...rk/boot/autoconfigure/MessageSourceAutoConfiguration.java
+1
-2
PropertyPlaceholderAutoConfiguration.java
...t/autoconfigure/PropertyPlaceholderAutoConfiguration.java
+1
-2
CloudAutoConfiguration.java
...work/boot/autoconfigure/cloud/CloudAutoConfiguration.java
+2
-2
JerseyAutoConfiguration.java
...rk/boot/autoconfigure/jersey/JerseyAutoConfiguration.java
+2
-2
DispatcherServletAutoConfiguration.java
...autoconfigure/web/DispatcherServletAutoConfiguration.java
+2
-1
EmbeddedServletContainerAutoConfiguration.java
...figure/web/EmbeddedServletContainerAutoConfiguration.java
+2
-2
WebMvcAutoConfiguration.java
...ework/boot/autoconfigure/web/WebMvcAutoConfiguration.java
+2
-2
AutoConfigurationSorterTests.java
...work/boot/autoconfigure/AutoConfigurationSorterTests.java
+2
-3
BatchAutoConfigurationTests.java
...boot/autoconfigure/batch/BatchAutoConfigurationTests.java
+8
-0
SampleIntegrationTests.java
.../org/springframework/boot/cli/SampleIntegrationTests.java
+2
-0
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
SampleBatchApplicationTests.java
...c/test/java/sample/batch/SampleBatchApplicationTests.java
+2
-0
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationSorter.java
View file @
16d61f84
...
@@ -28,7 +28,6 @@ import java.util.Map;
...
@@ -28,7 +28,6 @@ import java.util.Map;
import
java.util.Set
;
import
java.util.Set
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.core.io.ResourceLoader
;
import
org.springframework.core.type.AnnotationMetadata
;
import
org.springframework.core.type.AnnotationMetadata
;
import
org.springframework.core.type.classreading.CachingMetadataReaderFactory
;
import
org.springframework.core.type.classreading.CachingMetadataReaderFactory
;
...
@@ -142,7 +141,7 @@ class AutoConfigurationSorter {
...
@@ -142,7 +141,7 @@ class AutoConfigurationSorter {
public
int
getOrder
()
{
public
int
getOrder
()
{
Map
<
String
,
Object
>
orderedAnnotation
=
this
.
metadata
Map
<
String
,
Object
>
orderedAnnotation
=
this
.
metadata
.
getAnnotationAttributes
(
Order
.
class
.
getName
());
.
getAnnotationAttributes
(
AutoConfigure
Order
.
class
.
getName
());
return
(
orderedAnnotation
==
null
?
Ordered
.
LOWEST_PRECEDENCE
return
(
orderedAnnotation
==
null
?
Ordered
.
LOWEST_PRECEDENCE
:
(
Integer
)
orderedAnnotation
.
get
(
"value"
));
:
(
Integer
)
orderedAnnotation
.
get
(
"value"
));
}
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigureOrder.java
0 → 100644
View file @
16d61f84
/*
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
autoconfigure
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
/**
* Auto-configuration specific variant of Spring Framework's {@link Order} annotation.
* Allows auto-configuration classes to be ordered among themselves without affecting the
* order of configuration classes passed to
* {@link AnnotationConfigApplicationContext#register(Class...)}.
*
* @author Andy Wilkinson
* @since 1.3.0
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
({
ElementType
.
TYPE
,
ElementType
.
METHOD
,
ElementType
.
FIELD
})
public
@interface
AutoConfigureOrder
{
/**
* The order value. Default is {@link Ordered#LOWEST_PRECEDENCE}.
* @see Ordered#getOrder()
*/
int
value
()
default
Ordered
.
LOWEST_PRECEDENCE
;
}
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java
View file @
16d61f84
...
@@ -33,7 +33,6 @@ import org.springframework.context.annotation.Conditional;
...
@@ -33,7 +33,6 @@ import org.springframework.context.annotation.Conditional;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.support.ResourceBundleMessageSource
;
import
org.springframework.context.support.ResourceBundleMessageSource
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
org.springframework.core.type.AnnotatedTypeMetadata
;
import
org.springframework.core.type.AnnotatedTypeMetadata
;
...
@@ -51,7 +50,7 @@ import static org.springframework.util.StringUtils.trimAllWhitespace;
...
@@ -51,7 +50,7 @@ import static org.springframework.util.StringUtils.trimAllWhitespace;
*/
*/
@Configuration
@Configuration
@ConditionalOnMissingBean
(
MessageSource
.
class
)
@ConditionalOnMissingBean
(
MessageSource
.
class
)
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@
AutoConfigure
Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@Conditional
(
ResourceBundleCondition
.
class
)
@Conditional
(
ResourceBundleCondition
.
class
)
@EnableConfigurationProperties
@EnableConfigurationProperties
@ConfigurationProperties
(
prefix
=
"spring.messages"
)
@ConfigurationProperties
(
prefix
=
"spring.messages"
)
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/PropertyPlaceholderAutoConfiguration.java
View file @
16d61f84
...
@@ -22,7 +22,6 @@ import org.springframework.context.annotation.Bean;
...
@@ -22,7 +22,6 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.support.PropertySourcesPlaceholderConfigurer
;
import
org.springframework.context.support.PropertySourcesPlaceholderConfigurer
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
/**
/**
* {@link EnableAutoConfiguration Auto-configuration} for
* {@link EnableAutoConfiguration Auto-configuration} for
...
@@ -32,7 +31,7 @@ import org.springframework.core.annotation.Order;
...
@@ -32,7 +31,7 @@ import org.springframework.core.annotation.Order;
* @author Dave Syer
* @author Dave Syer
*/
*/
@Configuration
@Configuration
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@
AutoConfigure
Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
public
class
PropertyPlaceholderAutoConfiguration
{
public
class
PropertyPlaceholderAutoConfiguration
{
@Bean
@Bean
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cloud/CloudAutoConfiguration.java
View file @
16d61f84
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org
.
springframework
.
boot
.
autoconfigure
.
cloud
;
package
org
.
springframework
.
boot
.
autoconfigure
.
cloud
;
import
org.springframework.boot.autoconfigure.AutoConfigureOrder
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
...
@@ -28,7 +29,6 @@ import org.springframework.context.annotation.Configuration;
...
@@ -28,7 +29,6 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
/**
/**
* {@link EnableAutoConfiguration Auto-configuration} for Spring Cloud.
* {@link EnableAutoConfiguration Auto-configuration} for Spring Cloud.
...
@@ -47,7 +47,7 @@ import org.springframework.core.annotation.Order;
...
@@ -47,7 +47,7 @@ import org.springframework.core.annotation.Order;
*/
*/
@Configuration
@Configuration
@Profile
(
"cloud"
)
@Profile
(
"cloud"
)
@Order
(
CloudAutoConfiguration
.
ORDER
)
@
AutoConfigure
Order
(
CloudAutoConfiguration
.
ORDER
)
@ConditionalOnClass
(
CloudScanConfiguration
.
class
)
@ConditionalOnClass
(
CloudScanConfiguration
.
class
)
@ConditionalOnMissingBean
(
Cloud
.
class
)
@ConditionalOnMissingBean
(
Cloud
.
class
)
@ConditionalOnProperty
(
prefix
=
"spring.cloud"
,
name
=
"enabled"
,
havingValue
=
"true"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
prefix
=
"spring.cloud"
,
name
=
"enabled"
,
havingValue
=
"true"
,
matchIfMissing
=
true
)
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.java
View file @
16d61f84
...
@@ -33,6 +33,7 @@ import org.glassfish.jersey.servlet.ServletProperties;
...
@@ -33,6 +33,7 @@ import org.glassfish.jersey.servlet.ServletProperties;
import
org.springframework.beans.factory.ListableBeanFactory
;
import
org.springframework.beans.factory.ListableBeanFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.AutoConfigureBefore
;
import
org.springframework.boot.autoconfigure.AutoConfigureBefore
;
import
org.springframework.boot.autoconfigure.AutoConfigureOrder
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
...
@@ -48,7 +49,6 @@ import org.springframework.context.annotation.Bean;
...
@@ -48,7 +49,6 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.AnnotationUtils
;
import
org.springframework.core.annotation.AnnotationUtils
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.web.WebApplicationInitializer
;
import
org.springframework.web.WebApplicationInitializer
;
import
org.springframework.web.filter.RequestContextFilter
;
import
org.springframework.web.filter.RequestContextFilter
;
...
@@ -64,7 +64,7 @@ import org.springframework.web.filter.RequestContextFilter;
...
@@ -64,7 +64,7 @@ import org.springframework.web.filter.RequestContextFilter;
"javax.servlet.ServletRegistration"
})
"javax.servlet.ServletRegistration"
})
@ConditionalOnBean
(
type
=
"org.glassfish.jersey.server.ResourceConfig"
)
@ConditionalOnBean
(
type
=
"org.glassfish.jersey.server.ResourceConfig"
)
@ConditionalOnWebApplication
@ConditionalOnWebApplication
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@
AutoConfigure
Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@AutoConfigureBefore
(
DispatcherServletAutoConfiguration
.
class
)
@AutoConfigureBefore
(
DispatcherServletAutoConfiguration
.
class
)
@EnableConfigurationProperties
(
JerseyProperties
.
class
)
@EnableConfigurationProperties
(
JerseyProperties
.
class
)
public
class
JerseyAutoConfiguration
implements
WebApplicationInitializer
{
public
class
JerseyAutoConfiguration
implements
WebApplicationInitializer
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DispatcherServletAutoConfiguration.java
View file @
16d61f84
...
@@ -25,6 +25,7 @@ import javax.servlet.ServletRegistration;
...
@@ -25,6 +25,7 @@ import javax.servlet.ServletRegistration;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.AutoConfigureOrder
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.condition.ConditionOutcome
;
import
org.springframework.boot.autoconfigure.condition.ConditionOutcome
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
...
@@ -53,7 +54,7 @@ import org.springframework.web.servlet.DispatcherServlet;
...
@@ -53,7 +54,7 @@ import org.springframework.web.servlet.DispatcherServlet;
* @author Phillip Webb
* @author Phillip Webb
* @author Dave Syer
* @author Dave Syer
*/
*/
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@
AutoConfigure
Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@Configuration
@Configuration
@ConditionalOnWebApplication
@ConditionalOnWebApplication
@ConditionalOnClass
(
DispatcherServlet
.
class
)
@ConditionalOnClass
(
DispatcherServlet
.
class
)
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration.java
View file @
16d61f84
...
@@ -29,6 +29,7 @@ import org.springframework.beans.factory.BeanFactoryAware;
...
@@ -29,6 +29,7 @@ import org.springframework.beans.factory.BeanFactoryAware;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.support.BeanDefinitionRegistry
;
import
org.springframework.beans.factory.support.BeanDefinitionRegistry
;
import
org.springframework.beans.factory.support.RootBeanDefinition
;
import
org.springframework.beans.factory.support.RootBeanDefinition
;
import
org.springframework.boot.autoconfigure.AutoConfigureOrder
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
...
@@ -45,7 +46,6 @@ import org.springframework.context.annotation.Configuration;
...
@@ -45,7 +46,6 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.ImportBeanDefinitionRegistrar
;
import
org.springframework.context.annotation.ImportBeanDefinitionRegistrar
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.type.AnnotationMetadata
;
import
org.springframework.core.type.AnnotationMetadata
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.xnio.SslClientAuthMode
;
import
org.xnio.SslClientAuthMode
;
...
@@ -57,7 +57,7 @@ import org.xnio.SslClientAuthMode;
...
@@ -57,7 +57,7 @@ import org.xnio.SslClientAuthMode;
* @author Dave Syer
* @author Dave Syer
* @author Ivan Sopov
* @author Ivan Sopov
*/
*/
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@
AutoConfigure
Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@Configuration
@Configuration
@ConditionalOnWebApplication
@ConditionalOnWebApplication
@Import
(
EmbeddedServletContainerCustomizerBeanPostProcessorRegistrar
.
class
)
@Import
(
EmbeddedServletContainerCustomizerBeanPostProcessorRegistrar
.
class
)
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.java
View file @
16d61f84
...
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.ListableBeanFactory;
...
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.ListableBeanFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.AutoConfigureOrder
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
...
@@ -45,7 +46,6 @@ import org.springframework.context.annotation.Configuration;
...
@@ -45,7 +46,6 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.convert.converter.Converter
;
import
org.springframework.core.convert.converter.Converter
;
import
org.springframework.core.convert.converter.GenericConverter
;
import
org.springframework.core.convert.converter.GenericConverter
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.core.io.ClassPathResource
;
...
@@ -92,7 +92,7 @@ import org.springframework.web.servlet.view.InternalResourceViewResolver;
...
@@ -92,7 +92,7 @@ import org.springframework.web.servlet.view.InternalResourceViewResolver;
@ConditionalOnClass
({
Servlet
.
class
,
DispatcherServlet
.
class
,
@ConditionalOnClass
({
Servlet
.
class
,
DispatcherServlet
.
class
,
WebMvcConfigurerAdapter
.
class
})
WebMvcConfigurerAdapter
.
class
})
@ConditionalOnMissingBean
(
WebMvcConfigurationSupport
.
class
)
@ConditionalOnMissingBean
(
WebMvcConfigurationSupport
.
class
)
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
+
10
)
@
AutoConfigure
Order
(
Ordered
.
HIGHEST_PRECEDENCE
+
10
)
@AutoConfigureAfter
(
DispatcherServletAutoConfiguration
.
class
)
@AutoConfigureAfter
(
DispatcherServletAutoConfiguration
.
class
)
public
class
WebMvcAutoConfiguration
{
public
class
WebMvcAutoConfiguration
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationSorterTests.java
View file @
16d61f84
...
@@ -28,7 +28,6 @@ import org.junit.Rule;
...
@@ -28,7 +28,6 @@ import org.junit.Rule;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.junit.rules.ExpectedException
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.core.io.DefaultResourceLoader
;
import
org.springframework.core.io.DefaultResourceLoader
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
static
org
.
junit
.
Assert
.
assertThat
;
...
@@ -157,11 +156,11 @@ public class AutoConfigurationSorterTests {
...
@@ -157,11 +156,11 @@ public class AutoConfigurationSorterTests {
}
}
@Order
(
Ordered
.
LOWEST_PRECEDENCE
)
@
AutoConfigure
Order
(
Ordered
.
LOWEST_PRECEDENCE
)
public
static
class
OrderLowest
{
public
static
class
OrderLowest
{
}
}
@Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
@
AutoConfigure
Order
(
Ordered
.
HIGHEST_PRECEDENCE
)
public
static
class
OrderHighest
{
public
static
class
OrderHighest
{
}
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java
View file @
16d61f84
...
@@ -23,6 +23,7 @@ import javax.persistence.EntityManagerFactory;
...
@@ -23,6 +23,7 @@ import javax.persistence.EntityManagerFactory;
import
javax.sql.DataSource
;
import
javax.sql.DataSource
;
import
org.junit.After
;
import
org.junit.After
;
import
org.junit.Ignore
;
import
org.junit.Rule
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.junit.rules.ExpectedException
;
...
@@ -84,6 +85,7 @@ public class BatchAutoConfigurationTests {
...
@@ -84,6 +85,7 @@ public class BatchAutoConfigurationTests {
}
}
@Test
@Test
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
testDefaultContext
()
throws
Exception
{
public
void
testDefaultContext
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
TestConfiguration
.
class
,
this
.
context
.
register
(
TestConfiguration
.
class
,
...
@@ -120,6 +122,7 @@ public class BatchAutoConfigurationTests {
...
@@ -120,6 +122,7 @@ public class BatchAutoConfigurationTests {
}
}
@Test
@Test
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
testDefinesAndLaunchesJob
()
throws
Exception
{
public
void
testDefinesAndLaunchesJob
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
.
register
(
JobConfiguration
.
class
,
this
.
context
.
register
(
JobConfiguration
.
class
,
...
@@ -133,6 +136,7 @@ public class BatchAutoConfigurationTests {
...
@@ -133,6 +136,7 @@ public class BatchAutoConfigurationTests {
}
}
@Test
@Test
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
testDefinesAndLaunchesNamedJob
()
throws
Exception
{
public
void
testDefinesAndLaunchesNamedJob
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
...
@@ -149,6 +153,7 @@ public class BatchAutoConfigurationTests {
...
@@ -149,6 +153,7 @@ public class BatchAutoConfigurationTests {
}
}
@Test
@Test
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
testDefinesAndLaunchesLocalJob
()
throws
Exception
{
public
void
testDefinesAndLaunchesLocalJob
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
...
@@ -164,6 +169,7 @@ public class BatchAutoConfigurationTests {
...
@@ -164,6 +169,7 @@ public class BatchAutoConfigurationTests {
}
}
@Test
@Test
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
testDisableLaunchesJob
()
throws
Exception
{
public
void
testDisableLaunchesJob
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
...
@@ -177,6 +183,7 @@ public class BatchAutoConfigurationTests {
...
@@ -177,6 +183,7 @@ public class BatchAutoConfigurationTests {
}
}
@Test
@Test
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
testDisableSchemaLoader
()
throws
Exception
{
public
void
testDisableSchemaLoader
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
...
@@ -193,6 +200,7 @@ public class BatchAutoConfigurationTests {
...
@@ -193,6 +200,7 @@ public class BatchAutoConfigurationTests {
}
}
@Test
@Test
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
testUsingJpa
()
throws
Exception
{
public
void
testUsingJpa
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
// The order is very important here: DataSource -> Hibernate -> Batch
// The order is very important here: DataSource -> Hibernate -> Batch
...
...
spring-boot-cli/src/test/java/org/springframework/boot/cli/SampleIntegrationTests.java
View file @
16d61f84
...
@@ -63,6 +63,7 @@ public class SampleIntegrationTests {
...
@@ -63,6 +63,7 @@ public class SampleIntegrationTests {
}
}
@Test
@Test
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
jobSample
()
throws
Exception
{
public
void
jobSample
()
throws
Exception
{
String
output
=
this
.
cli
.
run
(
"job.groovy"
,
"foo=bar"
);
String
output
=
this
.
cli
.
run
(
"job.groovy"
,
"foo=bar"
);
assertTrue
(
"Wrong output: "
+
output
,
assertTrue
(
"Wrong output: "
+
output
,
...
@@ -81,6 +82,7 @@ public class SampleIntegrationTests {
...
@@ -81,6 +82,7 @@ public class SampleIntegrationTests {
}
}
@Test
@Test
@Ignore
(
"Spring Batch is incompatible with Spring Framework 4.2"
)
public
void
jobWebSample
()
throws
Exception
{
public
void
jobWebSample
()
throws
Exception
{
String
output
=
this
.
cli
.
run
(
"job.groovy"
,
"web.groovy"
,
"foo=bar"
);
String
output
=
this
.
cli
.
run
(
"job.groovy"
,
"web.groovy"
,
"foo=bar"
);
assertTrue
(
"Wrong output: "
+
output
,
assertTrue
(
"Wrong output: "
+
output
,
...
...
spring-boot-dependencies/pom.xml
View file @
16d61f84
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
<snakeyaml.version>
1.14
</snakeyaml.version>
<snakeyaml.version>
1.14
</snakeyaml.version>
<solr.version>
4.7.2
</solr.version>
<solr.version>
4.7.2
</solr.version>
<spock.version>
0.7-groovy-2.0
</spock.version>
<spock.version>
0.7-groovy-2.0
</spock.version>
<spring.version>
4.
1.6
.BUILD-SNAPSHOT
</spring.version>
<spring.version>
4.
2.0
.BUILD-SNAPSHOT
</spring.version>
<spring-amqp.version>
1.4.3.RELEASE
</spring-amqp.version>
<spring-amqp.version>
1.4.3.RELEASE
</spring-amqp.version>
<spring-cloud-connectors.version>
1.1.1.RELEASE
</spring-cloud-connectors.version>
<spring-cloud-connectors.version>
1.1.1.RELEASE
</spring-cloud-connectors.version>
<spring-batch.version>
3.0.3.RELEASE
</spring-batch.version>
<spring-batch.version>
3.0.3.RELEASE
</spring-batch.version>
...
...
spring-boot-samples/spring-boot-sample-batch/src/test/java/sample/batch/SampleBatchApplicationTests.java
View file @
16d61f84
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
sample
.
batch
;
package
sample
.
batch
;
import
org.junit.Ignore
;
import
org.junit.Rule
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
...
@@ -24,6 +25,7 @@ import org.springframework.boot.test.OutputCapture;
...
@@ -24,6 +25,7 @@ import org.springframework.boot.test.OutputCapture;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
@Ignore
(
"Due to the removal of ParameterizedRowMapper, Spring Batch is incompatible with Spring Framework 4.2"
)
public
class
SampleBatchApplicationTests
{
public
class
SampleBatchApplicationTests
{
@Rule
@Rule
...
...
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