SpringMVC出现[WARNING] No mapping for GET /...
@Configuration
@ComponentScan("com.itheima.controller")
@EnableWebMvc
public class SpringMvcConfig {
}
在配置类上加了注解@EnableWebMvc后,再次启动可以正常访问,@EnableWebMvc作用是启用MVC 相当于<mvc:annotation-driven />
@Configuration
@ComponentScan("com.itheima.controller")
@EnableWebMvc
public class SpringMvcConfig {
}
在配置类上加了注解@EnableWebMvc后,再次启动可以正常访问,@EnableWebMvc作用是启用MVC 相当于<mvc:annotation-driven />