diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java index da80f9eab0..83e62992bb 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfiguration.java @@ -55,11 +55,14 @@ import org.springframework.web.servlet.view.velocity.VelocityConfigurer; * @author Andy Wilkinson * @author Brian Clozel * @since 1.1.0 + * @deprecated In 1.4.0 following the deprecation of Velocity support in Spring Framework + * 4.3 */ @Configuration @ConditionalOnClass({ VelocityEngine.class, VelocityEngineFactory.class }) @AutoConfigureAfter(WebMvcAutoConfiguration.class) @EnableConfigurationProperties(VelocityProperties.class) +@Deprecated public class VelocityAutoConfiguration { private static final Log logger = LogFactory.getLog(VelocityAutoConfiguration.class); @@ -88,6 +91,7 @@ public class VelocityAutoConfiguration { } } + @Deprecated protected static class VelocityConfiguration { @Autowired @@ -107,6 +111,7 @@ public class VelocityAutoConfiguration { @Configuration @ConditionalOnNotWebApplication + @Deprecated public static class VelocityNonWebConfiguration extends VelocityConfiguration { @Bean @@ -122,6 +127,7 @@ public class VelocityAutoConfiguration { @Configuration @ConditionalOnClass(Servlet.class) @ConditionalOnWebApplication + @Deprecated public static class VelocityWebConfiguration extends VelocityConfiguration { @Bean diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java index adfe733cb0..567ac6ef73 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityProperties.java @@ -28,7 +28,10 @@ import org.springframework.web.servlet.view.velocity.VelocityViewResolver; * * @author Andy Wilkinson * @since 1.1.0 + * @deprecated In 1.4.0 following the deprecation of Velocity support in Spring Framework + * 4.3 */ +@Deprecated @ConfigurationProperties(prefix = "spring.velocity") public class VelocityProperties extends AbstractTemplateViewResolverProperties { diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java index 4b22131f18..177136c820 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProvider.java @@ -29,7 +29,10 @@ import org.springframework.util.ClassUtils; * * @author Andy Wilkinson * @since 1.1.0 + * @deprecated In 1.4.0 following the deprecation of Velocity support in Spring Framework + * 4.3 */ +@Deprecated public class VelocityTemplateAvailabilityProvider implements TemplateAvailabilityProvider { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java index af6af39594..2406ebb474 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/EnableAutoConfigurationImportSelectorTests.java @@ -45,7 +45,9 @@ import static org.mockito.BDDMockito.given; * * @author Andy Wilkinson * @author Stephane Nicoll + * */ +@SuppressWarnings("deprecation") @RunWith(MockitoJUnitRunner.class) public class EnableAutoConfigurationImportSelectorTests { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfigurationTests.java index e96aeeb1ed..c6dc6b2d03 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityAutoConfigurationTests.java @@ -54,6 +54,7 @@ import static org.hamcrest.Matchers.containsString; * @author Andy Wilkinson * @author Stephane Nicoll */ +@SuppressWarnings("deprecation") public class VelocityAutoConfigurationTests { @Rule diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProviderTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProviderTests.java index 5bcf0198d8..870729f915 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProviderTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/velocity/VelocityTemplateAvailabilityProviderTests.java @@ -30,6 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ +@SuppressWarnings("deprecation") public class VelocityTemplateAvailabilityProviderTests { private final TemplateAvailabilityProvider provider = new VelocityTemplateAvailabilityProvider(); diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 16af70c90a..959b5cb5e8 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1577,7 +1577,7 @@ Spring Boot includes auto-configuration support for the following templating eng * http://freemarker.org/docs/[FreeMarker] * http://docs.groovy-lang.org/docs/next/html/documentation/template-engines.html#_the_markuptemplateengine[Groovy] * http://www.thymeleaf.org[Thymeleaf] - * http://velocity.apache.org[Velocity] + * http://velocity.apache.org[Velocity] (deprecated in 1.4) * http://mustache.github.io/[Mustache] TIP: JSPs should be avoided if possible, there are several diff --git a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc index c00aa8f501..91fd49a8a5 100644 --- a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -482,7 +482,7 @@ and Hibernate. |Support for the Thymeleaf templating engine, including integration with Spring. |`spring-boot-starter-velocity` -|Support for the Velocity templating engine. +|Support for the Velocity templating engine. Deprecated in 1.4. |`spring-boot-starter-web` |Support for full-stack web development, including Tomcat and `spring-webmvc`. diff --git a/spring-boot-samples/spring-boot-sample-velocity/src/main/java/sample/velocity/SampleVelocityApplication.java b/spring-boot-samples/spring-boot-sample-velocity/src/main/java/sample/velocity/SampleVelocityApplication.java index 4be33e6ffe..4c8e008010 100644 --- a/spring-boot-samples/spring-boot-sample-velocity/src/main/java/sample/velocity/SampleVelocityApplication.java +++ b/spring-boot-samples/spring-boot-sample-velocity/src/main/java/sample/velocity/SampleVelocityApplication.java @@ -30,6 +30,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.ui.velocity.VelocityEngineUtils; @SpringBootApplication +@Deprecated public class SampleVelocityApplication implements CommandLineRunner { @Value("${application.message}") diff --git a/spring-boot-samples/spring-boot-sample-velocity/src/test/java/sample/velocity/SampleVelocityApplicationTests.java b/spring-boot-samples/spring-boot-sample-velocity/src/test/java/sample/velocity/SampleVelocityApplicationTests.java index 84d211d7ff..5473ad98ef 100644 --- a/spring-boot-samples/spring-boot-sample-velocity/src/test/java/sample/velocity/SampleVelocityApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-velocity/src/test/java/sample/velocity/SampleVelocityApplicationTests.java @@ -33,6 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(SampleVelocityApplication.class) +@SuppressWarnings("deprecation") public class SampleVelocityApplicationTests { @ClassRule diff --git a/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityViewResolver.java b/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityViewResolver.java index 0d7132a972..c58a2225a6 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityViewResolver.java +++ b/spring-boot/src/main/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityViewResolver.java @@ -26,7 +26,10 @@ import org.springframework.web.servlet.view.velocity.VelocityViewResolver; * * @author Phillip Webb * @since 1.2.5 + * @deprecated In 1.4.0 following the deprecation of Velocity support in Spring Framework + * 4.3 */ +@Deprecated public class EmbeddedVelocityViewResolver extends VelocityViewResolver { private String toolboxConfigLocation; diff --git a/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityToolboxViewTests.java b/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityToolboxViewTests.java index 6dcbe37692..5cfc50196e 100644 --- a/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityToolboxViewTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityToolboxViewTests.java @@ -40,6 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ +@SuppressWarnings("deprecation") public class EmbeddedVelocityToolboxViewTests { private static final String PATH = EmbeddedVelocityToolboxViewTests.class.getPackage() diff --git a/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityViewResolverTests.java b/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityViewResolverTests.java index 7e95127370..7a8efa785b 100644 --- a/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityViewResolverTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/web/servlet/view/velocity/EmbeddedVelocityViewResolverTests.java @@ -34,6 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ +@SuppressWarnings("deprecation") public class EmbeddedVelocityViewResolverTests { @Test