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
275bff39
Commit
275bff39
authored
Apr 24, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated code
Closes gh-8891
parent
269cea29
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
7 additions
and
331 deletions
+7
-331
EndpointMBeanExporter.java
...work/boot/actuate/endpoint/jmx/EndpointMBeanExporter.java
+0
-12
AutoConfigurationImportSelector.java
...k/boot/autoconfigure/AutoConfigurationImportSelector.java
+5
-0
EnableAutoConfiguration.java
...framework/boot/autoconfigure/EnableAutoConfiguration.java
+1
-1
EnableAutoConfigurationImportSelector.java
.../autoconfigure/EnableAutoConfigurationImportSelector.java
+0
-49
MessageSourceAutoConfiguration.java
...rk/boot/autoconfigure/MessageSourceAutoConfiguration.java
+0
-54
PropertyPlaceholderAutoConfiguration.java
...t/autoconfigure/PropertyPlaceholderAutoConfiguration.java
+0
-54
ServerProperties.java
...ingframework/boot/autoconfigure/web/ServerProperties.java
+0
-16
EnableAutoConfigurationImportSelectorTests.java
...configure/EnableAutoConfigurationImportSelectorTests.java
+0
-78
ApplicationStartedEvent.java
...framework/boot/context/event/ApplicationStartedEvent.java
+0
-47
EventPublishingRunListener.java
...mework/boot/context/event/EventPublishingRunListener.java
+1
-1
TomcatServletWebServerFactory.java
...ot/web/embedded/tomcat/TomcatServletWebServerFactory.java
+0
-12
UndertowServletWebServerFactory.java
...eb/embedded/undertow/UndertowServletWebServerFactory.java
+0
-5
SpringApplicationTests.java
...java/org/springframework/boot/SpringApplicationTests.java
+0
-2
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporter.java
View file @
275bff39
...
...
@@ -229,18 +229,6 @@ public class EndpointMBeanExporter extends MBeanExporter
* @return an adapted endpoint
*/
protected
JmxEndpoint
adaptEndpoint
(
String
beanName
,
Endpoint
<?>
endpoint
)
{
return
getEndpointMBean
(
beanName
,
endpoint
);
}
/**
* Get a {@link EndpointMBean} for the specified {@link Endpoint}.
* @param beanName the bean name
* @param endpoint the endpoint
* @return an {@link EndpointMBean}
* @deprecated as of 1.5 in favor of {@link #adaptEndpoint(String, Endpoint)}
*/
@Deprecated
protected
EndpointMBean
getEndpointMBean
(
String
beanName
,
Endpoint
<?>
endpoint
)
{
if
(
endpoint
instanceof
ShutdownEndpoint
)
{
return
new
ShutdownEndpointMBean
(
beanName
,
endpoint
,
this
.
objectMapper
);
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java
View file @
275bff39
...
...
@@ -106,6 +106,11 @@ public class AutoConfigurationImportSelector
}
protected
boolean
isEnabled
(
AnnotationMetadata
metadata
)
{
if
(
getClass
().
equals
(
AutoConfigurationImportSelector
.
class
))
{
return
getEnvironment
().
getProperty
(
EnableAutoConfiguration
.
ENABLED_OVERRIDE_PROPERTY
,
Boolean
.
class
,
true
);
}
return
true
;
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfiguration.java
View file @
275bff39
...
...
@@ -73,7 +73,7 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
@Documented
@Inherited
@AutoConfigurationPackage
@Import
(
Enable
AutoConfigurationImportSelector
.
class
)
@Import
(
AutoConfigurationImportSelector
.
class
)
public
@interface
EnableAutoConfiguration
{
String
ENABLED_OVERRIDE_PROPERTY
=
"spring.boot.enableautoconfiguration"
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelector.java
deleted
100644 → 0
View file @
269cea29
/*
* Copyright 2012-2017 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
org.springframework.context.annotation.DeferredImportSelector
;
import
org.springframework.core.type.AnnotationMetadata
;
/**
* {@link DeferredImportSelector} to handle {@link EnableAutoConfiguration
* auto-configuration}. This class can also be subclassed if a custom variant of
* {@link EnableAutoConfiguration @EnableAutoConfiguration}. is needed.
*
* @deprecated as of 1.5 in favor of {@link AutoConfigurationImportSelector}
* @author Phillip Webb
* @author Andy Wilkinson
* @author Stephane Nicoll
* @author Madhura Bhave
* @since 1.3.0
* @see EnableAutoConfiguration
*/
@Deprecated
public
class
EnableAutoConfigurationImportSelector
extends
AutoConfigurationImportSelector
{
@Override
protected
boolean
isEnabled
(
AnnotationMetadata
metadata
)
{
if
(
getClass
().
equals
(
EnableAutoConfigurationImportSelector
.
class
))
{
return
getEnvironment
().
getProperty
(
EnableAutoConfiguration
.
ENABLED_OVERRIDE_PROPERTY
,
Boolean
.
class
,
true
);
}
return
true
;
}
}
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfiguration.java
deleted
100644 → 0
View file @
269cea29
/*
* Copyright 2012-2017 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
org.springframework.context.MessageSource
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.ImportSelector
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.type.AnnotationMetadata
;
/**
* {@link EnableAutoConfiguration Auto-configuration} for {@link MessageSource}.
*
* @author Dave Syer
* @author Phillip Webb
* @author Eddú Meléndez
* @deprecated as of 1.5 in favor of
* {@link org.springframework.boot.autoconfigure.context.MessageSourceAutoConfiguration}
*/
@Configuration
@AutoConfigureOrder
(
Ordered
.
HIGHEST_PRECEDENCE
)
@Deprecated
@Import
(
MessageSourceAutoConfiguration
.
Selector
.
class
)
public
class
MessageSourceAutoConfiguration
{
private
static
final
String
[]
REPLACEMENT
=
{
"org.springframework.boot.autoconfigure.context."
+
"MessageSourceAutoConfiguration"
};
static
class
Selector
implements
ImportSelector
{
@Override
public
String
[]
selectImports
(
AnnotationMetadata
importingClassMetadata
)
{
return
REPLACEMENT
;
}
}
}
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/PropertyPlaceholderAutoConfiguration.java
deleted
100644 → 0
View file @
269cea29
/*
* Copyright 2012-2017 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
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.ImportSelector
;
import
org.springframework.context.support.PropertySourcesPlaceholderConfigurer
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.type.AnnotationMetadata
;
/**
* {@link EnableAutoConfiguration Auto-configuration} for
* {@link PropertySourcesPlaceholderConfigurer}.
*
* @author Phillip Webb
* @author Dave Syer
* @deprecated as of 1.5 in favor of
* {@link org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration}
*/
@Configuration
@AutoConfigureOrder
(
Ordered
.
HIGHEST_PRECEDENCE
)
@Deprecated
@Import
(
PropertyPlaceholderAutoConfiguration
.
Selector
.
class
)
public
class
PropertyPlaceholderAutoConfiguration
{
private
static
final
String
[]
REPLACEMENT
=
{
"org.springframework.boot.autoconfigure.context."
+
"PropertyPlaceholderAutoConfiguration"
};
static
class
Selector
implements
ImportSelector
{
@Override
public
String
[]
selectImports
(
AnnotationMetadata
importingClassMetadata
)
{
return
REPLACEMENT
;
}
}
}
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
View file @
275bff39
...
...
@@ -29,7 +29,6 @@ import java.util.Set;
import
java.util.TimeZone
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.DeprecatedConfigurationProperty
;
import
org.springframework.boot.context.properties.NestedConfigurationProperty
;
import
org.springframework.boot.web.server.Compression
;
import
org.springframework.boot.web.server.Ssl
;
...
...
@@ -1115,12 +1114,6 @@ public class ServerProperties {
*/
private
Integer
bufferSize
;
/**
* Number of buffer per region.
*/
@Deprecated
private
Integer
buffersPerRegion
;
/**
* Number of I/O threads to create for the worker.
*/
...
...
@@ -1154,15 +1147,6 @@ public class ServerProperties {
this
.
bufferSize
=
bufferSize
;
}
@DeprecatedConfigurationProperty
(
reason
=
"The property is not used by Undertow. See https://issues.jboss.org/browse/UNDERTOW-587 for details"
)
public
Integer
getBuffersPerRegion
()
{
return
this
.
buffersPerRegion
;
}
public
void
setBuffersPerRegion
(
Integer
buffersPerRegion
)
{
this
.
buffersPerRegion
=
buffersPerRegion
;
}
public
Integer
getIoThreads
()
{
return
this
.
ioThreads
;
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java
deleted
100644 → 0
View file @
269cea29
/*
* Copyright 2012-2017 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
org.junit.Before
;
import
org.junit.Test
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.support.DefaultListableBeanFactory
;
import
org.springframework.core.io.DefaultResourceLoader
;
import
org.springframework.core.type.StandardAnnotationMetadata
;
import
org.springframework.mock.env.MockEnvironment
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
* Tests for {@link EnableAutoConfigurationImportSelector}
*
* @author Andy Wilkinson
* @author Stephane Nicoll
* @author Madhura Bhave
*/
@SuppressWarnings
(
"deprecation"
)
public
class
EnableAutoConfigurationImportSelectorTests
{
private
final
EnableAutoConfigurationImportSelector
importSelector
=
new
EnableAutoConfigurationImportSelector
();
private
final
ConfigurableListableBeanFactory
beanFactory
=
new
DefaultListableBeanFactory
();
private
final
MockEnvironment
environment
=
new
MockEnvironment
();
@Before
public
void
setup
()
{
this
.
importSelector
.
setBeanFactory
(
this
.
beanFactory
);
this
.
importSelector
.
setEnvironment
(
this
.
environment
);
this
.
importSelector
.
setResourceLoader
(
new
DefaultResourceLoader
());
}
@Test
public
void
propertyOverrideSetToTrue
()
throws
Exception
{
this
.
environment
.
setProperty
(
EnableAutoConfiguration
.
ENABLED_OVERRIDE_PROPERTY
,
"true"
);
String
[]
imports
=
selectImports
(
BasicEnableAutoConfiguration
.
class
);
assertThat
(
imports
).
isNotEmpty
();
}
@Test
public
void
propertyOverrideSetToFalse
()
throws
Exception
{
this
.
environment
.
setProperty
(
EnableAutoConfiguration
.
ENABLED_OVERRIDE_PROPERTY
,
"false"
);
String
[]
imports
=
selectImports
(
BasicEnableAutoConfiguration
.
class
);
assertThat
(
imports
).
isEmpty
();
}
private
String
[]
selectImports
(
Class
<?>
source
)
{
return
this
.
importSelector
.
selectImports
(
new
StandardAnnotationMetadata
(
source
));
}
@EnableAutoConfiguration
private
class
BasicEnableAutoConfiguration
{
}
}
spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationStartedEvent.java
deleted
100644 → 0
View file @
269cea29
/*
* Copyright 2012-2016 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
.
context
.
event
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.core.env.Environment
;
/**
* Event published as early as conceivably possible as soon as a {@link SpringApplication}
* has been started - before the {@link Environment} or {@link ApplicationContext} is
* available, but after the {@link ApplicationListener}s have been registered. The source
* of the event is the {@link SpringApplication} itself, but beware of using its internal
* state too much at this early stage since it might be modified later in the lifecycle.
*
* @author Dave Syer
* @deprecated as of 1.5 in favor of {@link ApplicationStartingEvent}
*/
@Deprecated
@SuppressWarnings
(
"serial"
)
public
class
ApplicationStartedEvent
extends
ApplicationStartingEvent
{
/**
* Create a new {@link ApplicationStartedEvent} instance.
* @param application the current application
* @param args the arguments the application is running with
*/
public
ApplicationStartedEvent
(
SpringApplication
application
,
String
[]
args
)
{
super
(
application
,
args
);
}
}
spring-boot/src/main/java/org/springframework/boot/context/event/EventPublishingRunListener.java
View file @
275bff39
...
...
@@ -65,7 +65,7 @@ public class EventPublishingRunListener implements SpringApplicationRunListener,
@SuppressWarnings
(
"deprecation"
)
public
void
starting
()
{
this
.
initialMulticaster
.
multicastEvent
(
new
ApplicationStart
ed
Event
(
this
.
application
,
this
.
args
));
.
multicastEvent
(
new
ApplicationStart
ing
Event
(
this
.
application
,
this
.
args
));
}
@Override
...
...
spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java
View file @
275bff39
...
...
@@ -544,18 +544,6 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
this
.
baseDirectory
=
baseDirectory
;
}
/**
* A comma-separated list of jars to ignore for TLD scanning. See Tomcat's
* catalina.properties for typical values. Defaults to a list drawn from that source.
* @param tldSkip the jars to skip when scanning for TLDs etc
* @deprecated as of 1.5 in favor of {@link #setTldSkipPatterns(Collection)}
*/
@Deprecated
public
void
setTldSkip
(
String
tldSkip
)
{
Assert
.
notNull
(
tldSkip
,
"TldSkip must not be null"
);
setTldSkipPatterns
(
StringUtils
.
commaDelimitedListToSet
(
tldSkip
));
}
/**
* Returns a mutable set of the patterns that match jars to ignore for TLD scanning.
* @return the list of jars to ignore for TLD scanning
...
...
spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java
View file @
275bff39
...
...
@@ -580,11 +580,6 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
this
.
bufferSize
=
bufferSize
;
}
@Deprecated
public
void
setBuffersPerRegion
(
Integer
buffersPerRegion
)
{
}
public
void
setIoThreads
(
Integer
ioThreads
)
{
this
.
ioThreads
=
ioThreads
;
}
...
...
spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java
View file @
275bff39
...
...
@@ -377,8 +377,6 @@ public class SpringApplicationTests {
application
.
addListeners
(
new
ApplicationRunningEventListener
());
this
.
context
=
application
.
run
();
assertThat
(
events
).
hasSize
(
5
);
assertThat
(
events
.
get
(
0
)).
isInstanceOf
(
org
.
springframework
.
boot
.
context
.
event
.
ApplicationStartedEvent
.
class
);
assertThat
(
events
.
get
(
0
)).
isInstanceOf
(
ApplicationStartingEvent
.
class
);
assertThat
(
events
.
get
(
1
)).
isInstanceOf
(
ApplicationEnvironmentPreparedEvent
.
class
);
assertThat
(
events
.
get
(
2
)).
isInstanceOf
(
ApplicationPreparedEvent
.
class
);
...
...
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