- Run application
- Open in browser:
http://localhost:8080/ - Read page :)
@Configuration
public class MvcConfig implements WebMvcConfigurer {
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/simple-mvc-config").setViewName("simple-mvc-config");
}
}
See example:
/src/main/java/examples/controller/extend/AbstractApiController.java/src/main/java/examples/controller/extend/CompanyController.java
the result of the company's route will be: /companies, not what we thought: /api/companies
See test: /src/test/java/examples/controller/extend/AbstractApiControllerTest.java