diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/DataEndpointMBean.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/DataEndpointMBean.java index bdbf774f306..385821119b1 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/DataEndpointMBean.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/DataEndpointMBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * 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. diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBean.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBean.java index eac0dc9816a..2a6cec2f3a6 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBean.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2015 the original author or authors. + * 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. @@ -40,18 +40,6 @@ public class EndpointMBean { private final ObjectMapper mapper; - /** - * Create a new {@link EndpointMBean} instance. - * @param beanName the bean name - * @param endpoint the endpoint to wrap - * @deprecated since 1.3 in favor of - * {@link #EndpointMBean(String, Endpoint, ObjectMapper)} - */ - @Deprecated - public EndpointMBean(String beanName, Endpoint endpoint) { - this(beanName, endpoint, new ObjectMapper()); - } - /** * Create a new {@link EndpointMBean} instance. * @param beanName the bean name diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/ShutdownEndpointMBean.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/ShutdownEndpointMBean.java index 11a3cbab9cf..1af2ec2477f 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/ShutdownEndpointMBean.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/ShutdownEndpointMBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2016 the original author or authors. + * 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. diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/trace/WebRequestTraceFilter.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/trace/WebRequestTraceFilter.java index 0e47397833f..f0164bacf5c 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/trace/WebRequestTraceFilter.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/trace/WebRequestTraceFilter.java @@ -62,17 +62,6 @@ public class WebRequestTraceFilter extends OncePerRequestFilter implements Order private final TraceProperties properties; - /** - * Create a new {@link WebRequestTraceFilter} instance. - * @param traceRepository the trace repository. - * @deprecated since 1.3.0 in favor of - * {@link #WebRequestTraceFilter(TraceRepository, TraceProperties)} - */ - @Deprecated - public WebRequestTraceFilter(TraceRepository traceRepository) { - this(traceRepository, new TraceProperties()); - } - /** * Create a new {@link WebRequestTraceFilter} instance. * @param repository the trace repository diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingClass.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingClass.java index c29712397a3..c1379212eb2 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingClass.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingClass.java @@ -42,12 +42,4 @@ public @interface ConditionalOnMissingClass { */ String[] value() default {}; - /** - * An alias for {@link #value} specifying the names of the classes that must not be - * present. - * @return the class names that must not be present. - * @deprecated since 1.3.0 in favor of {@link #value}. - */ - String[] name() default {}; - } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateResolver.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateResolver.java deleted file mode 100644 index 74bce178412..00000000000 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateResolver.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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.groovy.template; - -import java.io.IOException; -import java.net.URL; - -import groovy.text.markup.MarkupTemplateEngine; -import groovy.text.markup.TemplateConfiguration; -import groovy.text.markup.TemplateResolver; - -import org.springframework.context.i18n.LocaleContextHolder; -import org.springframework.web.servlet.view.groovy.GroovyMarkupConfigurer; -import org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver; - -/** - * A custom {@link groovy.text.markup.TemplateResolver template resolver} which resolves - * templates using the locale found in the thread locale. This resolver ignores the - * template engine configuration locale. - * - * @author Cédric Champeau - * @since 1.1.0 - * @deprecated since 1.2 in favor of Spring 4.1's {@link GroovyMarkupViewResolver} and - * {@link GroovyMarkupConfigurer}. - */ -@Deprecated -public class GroovyTemplateResolver implements TemplateResolver { - - private ClassLoader templateClassLoader; - - @Override - public void configure(final ClassLoader templateClassLoader, - final TemplateConfiguration configuration) { - this.templateClassLoader = templateClassLoader; - } - - @Override - public URL resolveTemplate(final String templatePath) throws IOException { - MarkupTemplateEngine.TemplateResource templateResource = MarkupTemplateEngine.TemplateResource - .parse(templatePath); - URL resource = this.templateClassLoader.getResource(templateResource - .withLocale(LocaleContextHolder.getLocale().toString().replace("-", "_")) - .toString()); - if (resource == null) { - // no resource found with the default locale, try without any locale - resource = this.templateClassLoader - .getResource(templateResource.withLocale(null).toString()); - } - if (resource == null) { - throw new IOException("Unable to load template:" + templatePath); - } - return resource; - } - -} diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java index ae3f8b643ca..10a44297b99 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoProperties.java @@ -181,21 +181,6 @@ public class MongoProperties { return new MongoClientURI(this.uri).getDatabase(); } - /** - * Creates a {@link MongoClient} using the given {@code options}. - * - * @param options the options - * @return the Mongo client - * @throws UnknownHostException if the configured host is unknown - * @deprecated Since 1.3.0 in favour of - * {@link #createMongoClient(MongoClientOptions, Environment)} - */ - @Deprecated - public MongoClient createMongoClient(MongoClientOptions options) - throws UnknownHostException { - return this.createMongoClient(options, null); - } - /** * Creates a {@link MongoClient} using the given {@code options} and * {@code environment}. If the configured port is zero, the value of the diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/BasicErrorController.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/BasicErrorController.java index 7755315c4d6..5126f3244f8 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/BasicErrorController.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/BasicErrorController.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * 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. @@ -51,17 +51,6 @@ public class BasicErrorController extends AbstractErrorController { private final ErrorProperties errorProperties; - /** - * Create a new {@link BasicErrorController} instance. - * @param errorAttributes the error attributes - * @deprecated since 1.3.0 in favor of - * {@link #BasicErrorController(ErrorAttributes, ErrorProperties)} - */ - @Deprecated - public BasicErrorController(ErrorAttributes errorAttributes) { - this(errorAttributes, new ErrorProperties()); - } - /** * Create a new {@link BasicErrorController} instance. * @param errorAttributes the error attributes diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 6c8b2fcc972..80d61fcb9a5 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * 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. @@ -55,7 +55,6 @@ import org.springframework.boot.context.embedded.tomcat.TomcatContextCustomizer; import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory; import org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; import org.springframework.boot.context.properties.NestedConfigurationProperty; import org.springframework.context.EnvironmentAware; import org.springframework.core.Ordered; @@ -327,27 +326,6 @@ public class ServerProperties return (platform == null ? false : platform.isUsingForwardHeaders()); } - /** - * Get the session timeout. - * @return the session timeout - * @deprecated since 1.3.0 in favor of {@code session.timeout}. - */ - @Deprecated - @DeprecatedConfigurationProperty(replacement = "server.session.timeout") - public Integer getSessionTimeout() { - return this.session.getTimeout(); - } - - /** - * Set the session timeout. - * @param sessionTimeout the session timeout - * @deprecated since 1.3.0 in favor of {@code session.timeout}. - */ - @Deprecated - public void setSessionTimeout(Integer sessionTimeout) { - this.session.setTimeout(sessionTimeout); - } - public ErrorProperties getError() { return this.error; } @@ -632,48 +610,6 @@ public class ServerProperties return this.accesslog; } - /** - * Specify if access log is enabled. - * @return {@code true} if access log is enabled - * @deprecated since 1.3.0 in favor of {@code server.tomcat.accesslog.enabled} - */ - @Deprecated - @DeprecatedConfigurationProperty(replacement = "server.tomcat.accesslog.enabled") - public boolean getAccessLogEnabled() { - return this.accesslog.isEnabled(); - } - - /** - * Set if access log is enabled. - * @param accessLogEnabled the access log enable flag - * @deprecated since 1.3.0 in favor of {@code server.tomcat.accesslog.enabled} - */ - @Deprecated - public void setAccessLogEnabled(boolean accessLogEnabled) { - getAccesslog().setEnabled(accessLogEnabled); - } - - /** - * Get the format pattern for access logs. - * @return the format pattern for access logs - * @deprecated since 1.3.0 in favor of {@code server.tomcat.accesslog.pattern} - */ - @Deprecated - @DeprecatedConfigurationProperty(replacement = "server.tomcat.accesslog.pattern") - public String getAccessLogPattern() { - return this.accesslog.getPattern(); - } - - /** - * Set the format pattern for access logs. - * @param accessLogPattern the pattern for access logs - * @deprecated since 1.3.0 in favor of {@code server.tomcat.accesslog.pattern} - */ - @Deprecated - public void setAccessLogPattern(String accessLogPattern) { - this.accesslog.setPattern(accessLogPattern); - } - public int getBackgroundProcessorDelay() { return this.backgroundProcessorDelay; } @@ -990,69 +926,6 @@ public class ServerProperties return this.accesslog; } - /** - * Get the format pattern for access logs. - * @return the format pattern for access logs - * @deprecated since 1.3.0 in favor of {@code server.undertow.accesslog.pattern} - */ - @Deprecated - @DeprecatedConfigurationProperty(replacement = "server.undertow.accesslog.pattern") - public String getAccessLogPattern() { - return this.accesslog.getPattern(); - } - - /** - * Set the format pattern for access logs. - * @param accessLogPattern the pattern for access logs - * @deprecated since 1.3.0 in favor of {@code server.undertow.accesslog.pattern} - */ - @Deprecated - public void setAccessLogPattern(String accessLogPattern) { - this.accesslog.setPattern(accessLogPattern); - } - - /** - * Specify if access log is enabled. - * @return {@code true} if access log is enabled - * @deprecated since 1.3.0 in favor of {@code server.undertow.accesslog.enabled} - */ - @Deprecated - @DeprecatedConfigurationProperty(replacement = "server.undertow.accesslog.enabled") - public boolean isAccessLogEnabled() { - return this.accesslog.isEnabled(); - } - - /** - * Set if access log is enabled. - * @param accessLogEnabled the access log enable flag - * @deprecated since 1.3.0 in favor of {@code server.undertow.accesslog.enabled} - */ - @Deprecated - public void setAccessLogEnabled(boolean accessLogEnabled) { - getAccesslog().setEnabled(accessLogEnabled); - } - - /** - * Get the access log directory. - * @return the access log directory - * @deprecated since 1.3.0 in favor of {@code server.undertow.accesslog.dir} - */ - @Deprecated - @DeprecatedConfigurationProperty(replacement = "server.undertow.accesslog.dir") - public File getAccessLogDir() { - return this.accesslog.getDir(); - } - - /** - * Set the access log directory. - * @param accessLogDir the access log directory - * @deprecated since 1.3.0 in favor of {@code server.tomcat.accesslog.dir} - */ - @Deprecated - public void setAccessLogDir(File accessLogDir) { - getAccesslog().setDir(accessLogDir); - } - void customizeUndertow(ServerProperties serverProperties, UndertowEmbeddedServletContainerFactory factory) { factory.setBufferSize(this.bufferSize); diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingClassTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingClassTests.java index 04176fc1a04..c9a604dc5f1 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingClassTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingClassTests.java @@ -61,7 +61,7 @@ public class ConditionalOnMissingClassTests { } @Configuration - @ConditionalOnMissingClass(name = "FOO") + @ConditionalOnMissingClass("FOO") protected static class MissingConfiguration { @Bean public String bar() { diff --git a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index 6b34ac35a7c..77a0511e4e0 100644 --- a/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -957,17 +957,6 @@ public class SpringApplication { this.banner = banner; } - /** - * Sets if the Spring banner should be displayed when the application runs. Defaults - * to {@code true}. - * @param showBanner if the banner should be shown - * @deprecated since 1.3.0 in favor of {@link #setBannerMode} - */ - @Deprecated - public void setShowBanner(boolean showBanner) { - setBannerMode(showBanner ? Banner.Mode.CONSOLE : Banner.Mode.OFF); - } - /** * Sets the mode used to display the banner when the application runs. Defaults to * {@code Banner.Mode.CONSOLE}. diff --git a/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiElement.java b/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiElement.java index 9b664bc1192..d33924b458b 100644 --- a/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiElement.java +++ b/spring-boot/src/main/java/org/springframework/boot/ansi/AnsiElement.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * 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. @@ -23,112 +23,10 @@ package org.springframework.boot.ansi; */ public interface AnsiElement { - /** - * @deprecated in 1.3.0 in favor of {@link AnsiStyle#NORMAL} - */ - @Deprecated - AnsiElement NORMAL = new DefaultAnsiElement("0"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiStyle#BOLD} - */ - @Deprecated - AnsiElement BOLD = new DefaultAnsiElement("1"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiStyle#FAINT} - */ - @Deprecated - AnsiElement FAINT = new DefaultAnsiElement("2"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiStyle#ITALIC} - */ - @Deprecated - AnsiElement ITALIC = new DefaultAnsiElement("3"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiStyle#UNDERLINE} - */ - @Deprecated - AnsiElement UNDERLINE = new DefaultAnsiElement("4"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#BLACK} - */ - @Deprecated - AnsiElement BLACK = new DefaultAnsiElement("30"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#RED} - */ - @Deprecated - AnsiElement RED = new DefaultAnsiElement("31"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#GREEN} - */ - @Deprecated - AnsiElement GREEN = new DefaultAnsiElement("32"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#YELLOW} - */ - @Deprecated - AnsiElement YELLOW = new DefaultAnsiElement("33"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#BLUE} - */ - @Deprecated - AnsiElement BLUE = new DefaultAnsiElement("34"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#MAGENTA} - */ - @Deprecated - AnsiElement MAGENTA = new DefaultAnsiElement("35"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#CYAN} - */ - @Deprecated - AnsiElement CYAN = new DefaultAnsiElement("36"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#WHITE} - */ - @Deprecated - AnsiElement WHITE = new DefaultAnsiElement("37"); - - /** - * @deprecated in 1.3.0 in favor of {@link AnsiColor#DEFAULT} - */ - @Deprecated - AnsiElement DEFAULT = new DefaultAnsiElement("39"); - /** * @return the ANSI escape code */ @Override String toString(); - /** - * Internal default {@link AnsiElement} implementation. - */ - class DefaultAnsiElement implements AnsiElement { - - private final String code; - - DefaultAnsiElement(String code) { - this.code = code; - } - - @Override - public String toString() { - return this.code; - } - - } - } diff --git a/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/VcapEnvironmentPostProcessor.java b/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/VcapEnvironmentPostProcessor.java deleted file mode 100644 index 5cb0cb11bd6..00000000000 --- a/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/VcapEnvironmentPostProcessor.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2010-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.cloudfoundry; - -import org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor; -import org.springframework.boot.env.EnvironmentPostProcessor; -import org.springframework.core.env.Environment; - -/** - * An {@link EnvironmentPostProcessor} that knows where to find VCAP (a.k.a. Cloud - * Foundry) meta data in the existing environment. It parses out the VCAP_APPLICATION and - * VCAP_SERVICES meta data and dumps it in a form that is easily consumed by - * {@link Environment} users. If the app is running in Cloud Foundry then both meta data - * items are JSON objects encoded in OS environment variables. VCAP_APPLICATION is a - * shallow hash with basic information about the application (name, instance id, instance - * index, etc.), and VCAP_SERVICES is a hash of lists where the keys are service labels - * and the values are lists of hashes of service instance meta data. Examples are: - * - *
- * VCAP_APPLICATION: {"instance_id":"2ce0ac627a6c8e47e936d829a3a47b5b","instance_index":0,
- *   "version":"0138c4a6-2a73-416b-aca0-572c09f7ca53","name":"foo",
- *   "uris":["foo.cfapps.io"], ...}
- * VCAP_SERVICES: {"rds-mysql-1.0":[{"name":"mysql","label":"rds-mysql-1.0","plan":"10mb",
- *   "credentials":{"name":"d04fb13d27d964c62b267bbba1cffb9da","hostname":"mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com",
- *   "host":"mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com","port":3306,"user":"urpRuqTf8Cpe6",
- *   "username":"urpRuqTf8Cpe6","password":"pxLsGVpsC9A5S"}
- * }]}
- * 
- * - * These objects are flattened into properties. The VCAP_APPLICATION object goes straight - * to {@code vcap.application.*} in a fairly obvious way, and the VCAP_SERVICES object is - * unwrapped so that it is a hash of objects with key equal to the service instance name - * (e.g. "mysql" in the example above), and value equal to that instances properties, and - * then flattened in the same way. E.g. - * - *
- * vcap.application.instance_id: 2ce0ac627a6c8e47e936d829a3a47b5b
- * vcap.application.version: 0138c4a6-2a73-416b-aca0-572c09f7ca53
- * vcap.application.name: foo
- * vcap.application.uris[0]: foo.cfapps.io
- *
- * vcap.services.mysql.name: mysql
- * vcap.services.mysql.label: rds-mysql-1.0
- * vcap.services.mysql.credentials.name: d04fb13d27d964c62b267bbba1cffb9da
- * vcap.services.mysql.credentials.port: 3306
- * vcap.services.mysql.credentials.host: mysql-service-public.clqg2e2w3ecf.us-east-1.rds.amazonaws.com
- * vcap.services.mysql.credentials.username: urpRuqTf8Cpe6
- * vcap.services.mysql.credentials.password: pxLsGVpsC9A5S
- * ...
- * 
- * - * N.B. this initializer is mainly intended for informational use (the application and - * instance ids are particularly useful). For service binding you might find that Spring - * Cloud is more convenient and more robust against potential changes in Cloud Foundry. - * - * @author Dave Syer - * @author Andy Wilkinson - * @deprecated since 1.3.0 in favor of CloudFoundryVcapEnvironmentPostProcessor - */ -@Deprecated -public class VcapEnvironmentPostProcessor - extends CloudFoundryVcapEnvironmentPostProcessor { - -} diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/AbstractConfigurableEmbeddedServletContainer.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/AbstractConfigurableEmbeddedServletContainer.java index fe36e8e012f..24c8826e3f4 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/AbstractConfigurableEmbeddedServletContainer.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/AbstractConfigurableEmbeddedServletContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * 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. @@ -270,12 +270,6 @@ public abstract class AbstractConfigurableEmbeddedServletContainer this.registerDefaultServlet = registerDefaultServlet; } - @Override - public void setRegisterJspServlet(boolean registerJspServlet) { - Assert.notNull(this.jspServlet); - this.jspServlet.setRegistered(registerJspServlet); - } - /** * Flag to indicate that the default servlet should be registered. * @return true if the default servlet is to be registered @@ -293,12 +287,6 @@ public abstract class AbstractConfigurableEmbeddedServletContainer return this.ssl; } - @Override - public void setJspServletClassName(String jspServletClassName) { - Assert.notNull(this.jspServlet); - this.jspServlet.setClassName(jspServletClassName); - } - @Override public void setJspServlet(JspServlet jspServlet) { this.jspServlet = jspServlet; diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/ConfigurableEmbeddedServletContainer.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/ConfigurableEmbeddedServletContainer.java index 94ccb039fcd..f3cfba84429 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/ConfigurableEmbeddedServletContainer.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/ConfigurableEmbeddedServletContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * 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. @@ -92,32 +92,6 @@ public interface ConfigurableEmbeddedServletContainer { */ void setAddress(InetAddress address); - /** - * The class name for the jsp servlet if used. If - * {@link #setRegisterJspServlet(boolean) registerJspServlet} is true and this - * class is on the classpath then it will be registered. Since both Tomcat and Jetty - * use Jasper for their JSP implementation the default is - * {@code org.apache.jasper.servlet.JspServlet}. - * @param jspServletClassName the class name for the JSP servlet if used - * @deprecated in 1.3.0 in favor of {@link JspServlet#setClassName(String)} - * @see #setJspServlet - * @see JspServlet#setClassName(String) - */ - @Deprecated - void setJspServletClassName(String jspServletClassName); - - /** - * Set if the JspServlet should be registered if it is on the classpath. Defaults to - * {@code true} so that files from the {@link #setDocumentRoot(File) document root} - * will be served. - * @param registerJspServlet if the JSP servlet should be registered - * @deprecated in 1.3.0 in favor of {@link JspServlet#setRegistered(boolean)} - * @see #setJspServlet - * @see JspServlet#setRegistered(boolean) - */ - @Deprecated - void setRegisterJspServlet(boolean registerJspServlet); - /** * Set if the DefaultServlet should be registered. Defaults to {@code true} so that * files from the {@link #setDocumentRoot(File) document root} will be served. diff --git a/spring-boot/src/main/java/org/springframework/boot/test/ServerPortInfoApplicationContextInitializer.java b/spring-boot/src/main/java/org/springframework/boot/test/ServerPortInfoApplicationContextInitializer.java deleted file mode 100644 index 988ce075d8d..00000000000 --- a/spring-boot/src/main/java/org/springframework/boot/test/ServerPortInfoApplicationContextInitializer.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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.test; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.context.embedded.EmbeddedServletContainer; -import org.springframework.boot.context.embedded.EmbeddedWebApplicationContext; -import org.springframework.context.ApplicationContextInitializer; -import org.springframework.core.env.Environment; - -/** - * {@link ApplicationContextInitializer} that sets {@link Environment} properties for the - * ports that {@link EmbeddedServletContainer} servers are actually listening on. The - * property {@literal "local.server.port"} can be injected directly into tests using - * {@link Value @Value} or obtained via the {@link Environment}. - *

- * If the {@link EmbeddedWebApplicationContext} has a - * {@link EmbeddedWebApplicationContext#setNamespace(String) namespace} set, it will be - * used to construct the property name. For example, the "management" actuator context - * will have the property name {@literal "local.management.port"}. - *

- * Properties are automatically propagated up to any parent context. - * - * @author Dave Syer - * @author Phillip Webb - * @deprecated since 1.3 in favor of - * org.springframework.boot.context.web.ServerPortInfoApplicationContextInitializer - */ -@Deprecated -public class ServerPortInfoApplicationContextInitializer extends - org.springframework.boot.context.web.ServerPortInfoApplicationContextInitializer { - -} diff --git a/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index dec42064e9c..b65cd6ce2bf 100644 --- a/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -177,24 +177,6 @@ public class SpringApplicationTests { verify(application, never()).printBanner((Environment) anyObject()); } - @SuppressWarnings("deprecation") - @Test - public void disableBannerWithBoolean() throws Exception { - SpringApplication application = spy(new SpringApplication(ExampleConfig.class)); - application.setWebEnvironment(false); - application.setShowBanner(false); - this.context = application.run(); - verify(application, never()).printBanner((Environment) anyObject()); - } - - @Test - public void disableBannerViaShowBannerProperty() throws Exception { - SpringApplication application = spy(new SpringApplication(ExampleConfig.class)); - application.setWebEnvironment(false); - this.context = application.run("--spring.main.show_banner=false"); - verify(application, never()).printBanner((Environment) anyObject()); - } - @Test public void disableBannerViaBannerModeProperty() throws Exception { SpringApplication application = spy(new SpringApplication(ExampleConfig.class));