|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package cokr.xit.base.boot;
|
|
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
|
|
|
|
|
|
@ -13,19 +14,14 @@ import cokr.xit.foundation.boot.MvcConfig;
|
|
|
|
|
*/
|
|
|
|
|
@Configuration
|
|
|
|
|
public class MvcConfig2 extends MvcConfig {
|
|
|
|
|
/**MenuInjector를 반환한다.
|
|
|
|
|
* @return MenuInjector
|
|
|
|
|
*/
|
|
|
|
|
@Bean
|
|
|
|
|
public MenuInjector menuInjector() {
|
|
|
|
|
return new MenuInjector();
|
|
|
|
|
}
|
|
|
|
|
@Resource(name = "menuInjector")
|
|
|
|
|
private MenuInjector menuInjector;
|
|
|
|
|
|
|
|
|
|
/**MenuInjector를 interceptor로 추가한다.
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
|
|
|
// super.addInterceptors(registry);
|
|
|
|
|
registry.addInterceptor(menuInjector()).addPathPatterns(Foundation.urlPatterns());
|
|
|
|
|
registry.addInterceptor(menuInjector).addPathPatterns(Foundation.urlPatterns());
|
|
|
|
|
}
|
|
|
|
|
}
|