Last change
on this file since 46fd0c7 was 46fd0c7, checked in by Gjoko Kostadinov <gjoko.kostadinov@…>, 16 months ago |
Add admin page initial work.
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[cf9cdbf] | 1 | package edu.gjoko.schedlr.config;
|
---|
| 2 |
|
---|
| 3 | import org.springframework.context.annotation.Configuration;
|
---|
[46fd0c7] | 4 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
---|
[cf9cdbf] | 5 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
---|
| 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
---|
| 7 |
|
---|
| 8 | @Configuration
|
---|
| 9 | public class MvcConfig implements WebMvcConfigurer {
|
---|
| 10 |
|
---|
| 11 | @Override
|
---|
| 12 | public void addViewControllers(ViewControllerRegistry registry) {
|
---|
| 13 | registry.addViewController("/login").setViewName("login");
|
---|
[204464d] | 14 | registry.addViewController("/register_customer").setViewName("register_customer");
|
---|
| 15 | registry.addViewController("/register_business").setViewName("register_business");
|
---|
[cf9cdbf] | 16 | registry.addViewController("/homepage").setViewName("homepage");
|
---|
[46fd0c7] | 17 | registry.addViewController("/admin").setViewName("admin");
|
---|
[cf9cdbf] | 18 | }
|
---|
[044bd76] | 19 |
|
---|
[46fd0c7] | 20 | @Override
|
---|
| 21 | public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
---|
| 22 | registry.addResourceHandler("/resources/**")
|
---|
| 23 | .addResourceLocations("/resources/");
|
---|
| 24 | }
|
---|
[cf9cdbf] | 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.