BAEL-97 - minor fixes

This commit is contained in:
slavisa-baeldung 2017-01-05 13:05:51 +01:00
parent 0464c9f3bc
commit a9700891ef
2 changed files with 11 additions and 22 deletions

View File

@ -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();

View File

@ -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();
}
}