SpringMvc搭建配置

一次,在搭建springmvc框架的时候,按部就班突然遇到dispatcher-servlet.xml的问题,context:component-scan并不会报错,但是controler可以拦截url,注解扫描不到,个人判断是配置不全。
补全之后是这样的:

<beans xmlns="http://www.springframework.org/schema/beans"  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">

如果你用到的更多需要继续补充,希望有所帮助。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。