|
|
|
@ -27,10 +27,7 @@ import org.springframework.context.annotation.Import; |
|
|
|
|
* <pre class="code"> |
|
|
|
|
* @Configuration |
|
|
|
|
* @EnableWebMvc |
|
|
|
|
* @ComponentScan( |
|
|
|
|
* basePackageClasses = { MyConfiguration.class }, |
|
|
|
|
* excludeFilters = { @Filter(type = FilterType.ANNOTATION, value = Configuration.class) } |
|
|
|
|
* ) |
|
|
|
|
* @ComponentScan(basePackageClasses = { MyConfiguration.class }) |
|
|
|
|
* public class MyWebConfiguration { |
|
|
|
|
* |
|
|
|
|
* } |
|
|
|
@ -42,10 +39,7 @@ import org.springframework.context.annotation.Import; |
|
|
|
|
* <pre class="code"> |
|
|
|
|
* @Configuration |
|
|
|
|
* @EnableWebMvc |
|
|
|
|
* @ComponentScan( |
|
|
|
|
* basePackageClasses = { MyConfiguration.class }, |
|
|
|
|
* excludeFilters = { @Filter(type = FilterType.ANNOTATION, value = Configuration.class) } |
|
|
|
|
* ) |
|
|
|
|
* @ComponentScan(basePackageClasses = { MyConfiguration.class }) |
|
|
|
|
* public class MyConfiguration extends WebMvcConfigurerAdapter { |
|
|
|
|
* |
|
|
|
|
* @Override |
|
|
|
@ -59,7 +53,6 @@ import org.springframework.context.annotation.Import; |
|
|
|
|
* } |
|
|
|
|
* |
|
|
|
|
* // More overridden methods ...
|
|
|
|
|
* |
|
|
|
|
* } |
|
|
|
|
* </pre> |
|
|
|
|
* |
|
|
|
@ -70,10 +63,7 @@ import org.springframework.context.annotation.Import; |
|
|
|
|
* |
|
|
|
|
* <pre class="code"> |
|
|
|
|
* @Configuration |
|
|
|
|
* @ComponentScan( |
|
|
|
|
* basePackageClasses = { MyConfiguration.class }, |
|
|
|
|
* excludeFilters = { @Filter(type = FilterType.ANNOTATION, value = Configuration.class) } |
|
|
|
|
* ) |
|
|
|
|
* @ComponentScan(basePackageClasses = { MyConfiguration.class }) |
|
|
|
|
* public class MyConfiguration extends WebMvcConfigurationSupport { |
|
|
|
|
* |
|
|
|
|
* @Override |
|
|
|
@ -86,7 +76,6 @@ import org.springframework.context.annotation.Import; |
|
|
|
|
* // Create or delegate to "super" to create and
|
|
|
|
|
* // customize properties of RequestMapingHandlerAdapter
|
|
|
|
|
* } |
|
|
|
|
* |
|
|
|
|
* } |
|
|
|
|
* </pre> |
|
|
|
|
* |
|
|
|
|