Spring mvc 如何实施<;mvc:注释驱动/>;
我的Spring mvc 如何实施<;mvc:注释驱动/>;,spring-mvc,bean-validation,spring-annotations,Spring Mvc,Bean Validation,Spring Annotations,我的有问题。我想使用JSR-303注释 检查此图像。 尝试添加xmlns:mvc="http://www.springframework.org/schema/mvc属性以及添加http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.x
有问题。我想使用JSR-303注释
检查此图像。
尝试添加
xmlns:mvc="http://www.springframework.org/schema/mvc
属性以及添加http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
在您开始的bean
元素的xsi:schemaLocation
中
比如:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
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 http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
显然,保留当前配置中您正在使用但不在上述示例中的其他名称空间,如
xmlns:jee
(如果需要)。当然……很高兴它有帮助!