File tree Expand file tree Collapse file tree
spring-rest-full/src/main/resources
spring-rest-query-language/src/main Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11server.port =8082
2- server.context-path =/spring-rest-full
2+ server.servlet. context-path =/spring-rest-full
33endpoints.metrics.enabled =true
Original file line number Diff line number Diff line change 66import org .springframework .web .servlet .ViewResolver ;
77import org .springframework .web .servlet .config .annotation .EnableWebMvc ;
88import org .springframework .web .servlet .config .annotation .ViewControllerRegistry ;
9- import org .springframework .web .servlet .config .annotation .WebMvcConfigurerAdapter ;
9+ import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
1010import org .springframework .web .servlet .view .InternalResourceViewResolver ;
1111
1212@ Configuration
1313@ ComponentScan ("org.baeldung.web" )
1414@ EnableWebMvc
15- public class WebConfig extends WebMvcConfigurerAdapter {
15+ public class WebConfig implements WebMvcConfigurer {
1616
1717 public WebConfig () {
1818 super ();
@@ -29,7 +29,6 @@ public ViewResolver viewResolver() {
2929 // API
3030 @ Override
3131 public void addViewControllers (final ViewControllerRegistry registry ) {
32- super .addViewControllers (registry );
3332 registry .addViewController ("/homepage.html" );
3433 }
3534
Original file line number Diff line number Diff line change 11server.port =8082
2- server.context-path =/spring-rest-query-language
2+ server.servlet. context-path =/spring-rest-query-language
Original file line number Diff line number Diff line change 3434 <artifactId >spring-boot-starter-test</artifactId >
3535 <scope >test</scope >
3636 </dependency >
37+ <dependency >
38+ <groupId >org.springframework.boot</groupId >
39+ <artifactId >spring-boot-starter-web</artifactId >
40+ </dependency >
3741
3842 <!-- Spring -->
3943 <dependency >
Original file line number Diff line number Diff line change 11server.port = 8082
2- server.context-path =/spring-rest
2+ server.servlet. context-path =/spring-rest
You can’t perform that action at this time.
0 commit comments