|
|
|
@ -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"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -35,6 +35,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWebAppli |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; |
|
|
|
import org.springframework.boot.autoconfigure.template.TemplateLocation; |
|
|
|
import org.springframework.boot.autoconfigure.template.TemplateLocation; |
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.web.ConditionalOnEnabledResourceChain; |
|
|
|
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; |
|
|
|
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; |
|
|
|
import org.springframework.boot.context.properties.EnableConfigurationProperties; |
|
|
|
import org.springframework.boot.context.properties.EnableConfigurationProperties; |
|
|
|
import org.springframework.context.ApplicationContext; |
|
|
|
import org.springframework.context.ApplicationContext; |
|
|
|
@ -42,6 +43,7 @@ import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.ui.freemarker.FreeMarkerConfigurationFactory; |
|
|
|
import org.springframework.ui.freemarker.FreeMarkerConfigurationFactory; |
|
|
|
import org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean; |
|
|
|
import org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean; |
|
|
|
|
|
|
|
import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter; |
|
|
|
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfig; |
|
|
|
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfig; |
|
|
|
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; |
|
|
|
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; |
|
|
|
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver; |
|
|
|
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver; |
|
|
|
@ -51,6 +53,7 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver; |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Andy Wilkinson |
|
|
|
* @author Andy Wilkinson |
|
|
|
* @author Dave Syer |
|
|
|
* @author Dave Syer |
|
|
|
|
|
|
|
* @author Kazuki Shimizu |
|
|
|
* @since 1.1.0 |
|
|
|
* @since 1.1.0 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Configuration |
|
|
|
@Configuration |
|
|
|
@ -149,5 +152,12 @@ public class FreeMarkerAutoConfiguration { |
|
|
|
return resolver; |
|
|
|
return resolver; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
|
|
|
@ConditionalOnMissingBean |
|
|
|
|
|
|
|
@ConditionalOnEnabledResourceChain |
|
|
|
|
|
|
|
public ResourceUrlEncodingFilter resourceUrlEncodingFilter() { |
|
|
|
|
|
|
|
return new ResourceUrlEncodingFilter(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|