SpringBoot中mvc配置
使用@Configuration注解,千万不能使用@EnableWebMvc
该注解会关闭所有SpringBoot的mvc原有配置
package com.peng;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class MyConfig implements WebMvcConfigurer {
}