WebMvcConfigurerAdapter已过时

Spring Boot2.0的版本(创建的时候自动选择的这个版本),然后编译器告诉我WebMvcConfigurerAdapter已过时了

 

复制代码
@Deprecated
public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer {

    /**
     * {@inheritDoc}
     * 

This implementation is empty. */ @Override public void configurePathMatch(PathMatchConfigurer configurer) { }

复制代码

 

新的实现是: 

@Configuration
public class WebMvcConfg implements WebMvcConfigurer {
  //省略
}
@Configuration
public class WebMvcConfg extends WebMvcConfigurationSupport {
  //省略
}
推荐

转载于:https://www.cnblogs.com/t0000/articles/9455195.html

你可能感兴趣的:(WebMvcConfigurerAdapter已过时)