BAEL-97 - minor fixes
This commit is contained in:
parent
0464c9f3bc
commit
a9700891ef
|
@ -10,14 +10,6 @@ import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
|||
@Configuration
|
||||
public class BeanNameUrlHandlerMappingConfig {
|
||||
|
||||
@Bean
|
||||
public ViewResolver viewResolver() {
|
||||
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
|
||||
viewResolver.setPrefix("/");
|
||||
viewResolver.setSuffix(".jsp");
|
||||
return viewResolver;
|
||||
}
|
||||
|
||||
@Bean
|
||||
BeanNameUrlHandlerMapping beanNameUrlHandlerMapping() {
|
||||
return new BeanNameUrlHandlerMapping();
|
||||
|
|
|
@ -23,12 +23,6 @@ public class HandlerMappingPrioritiesConfig {
|
|||
return beanNameUrlHandlerMapping;
|
||||
}
|
||||
|
||||
@Bean("/welcome")
|
||||
public BaeldungController welcomeBaeldungController() {
|
||||
BaeldungController baeldungController = new BaeldungController();
|
||||
return baeldungController;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SimpleUrlHandlerMapping simpleUrlHandlerMapping() {
|
||||
SimpleUrlHandlerMapping simpleUrlHandlerMapping = new SimpleUrlHandlerMapping();
|
||||
|
@ -39,12 +33,6 @@ public class HandlerMappingPrioritiesConfig {
|
|||
return simpleUrlHandlerMapping;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TestController test() {
|
||||
TestController test = new TestController();
|
||||
return test;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ControllerClassNameHandlerMapping controllerClassNameHandlerMapping() {
|
||||
ControllerClassNameHandlerMapping bean = new ControllerClassNameHandlerMapping();
|
||||
|
@ -52,9 +40,18 @@ public class HandlerMappingPrioritiesConfig {
|
|||
return bean;
|
||||
}
|
||||
|
||||
@Bean("/welcome")
|
||||
public BaeldungController welcomeBaeldungController() {
|
||||
return new BaeldungController();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public TestController test() {
|
||||
return new TestController();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public WelcomeController welcomeController() {
|
||||
WelcomeController bean = new WelcomeController();
|
||||
return bean;
|
||||
return new WelcomeController();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue