-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathMvcInitializer.java
28 lines (23 loc) · 972 Bytes
/
MvcInitializer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.example.web.config;
import com.example.persistence.config.DataSourceConfig;
import com.example.persistence.config.JdbcConfig;
import com.example.security.config.SecurityConfig;
import com.example.service.config.ServiceConfig;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
// TODO 5-08 このクラスを削除する
public class MvcInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
// getRootConfigClasses()をオーバーライドしてnullをreturnする
@Override
protected Class<?>[] getRootConfigClasses() {
return null;
}
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[]{DataSourceConfig.class, JdbcConfig.class, ServiceConfig.class,
MvcConfig.class, SecurityConfig.class};
}
@Override
protected String[] getServletMappings() {
return new String[]{ "/" };
}
}