我正在使用 springboot 1.5.2,我正在使用 jersey 和 jsf
我有默认视图的映射/如下:
@Bean
public WebMvcConfigurerAdapter defaultView() {
return new WebMvcConfigurerAdapter() {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("forward:/faces/public/login.xhtml");
registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
super.addViewControllers(registry);
}
};
}
在我添加球衣配置之前,它工作正常,在我添加以下球衣配置后,它停止工作:
@Configuration
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
register(MyService.class);
}
}
当我删除 JerSeyConfig 类时,映射工作正常,但是当我添加它时,映射停止工作,请告知如何让它们一起正常工作。