找不到Spring NamespaceHandler推土机
我正在使用Dozer 5.4.0和Spring 3.2.4以及Maven 我尝试通过以下方式通过XML配置推土机:找不到Spring NamespaceHandler推土机,spring,maven,dozer,Spring,Maven,Dozer,我正在使用Dozer 5.4.0和Spring 3.2.4以及Maven 我尝试通过以下方式通过XML配置推土机: <?xml version="1.0" encoding="UTF-8"?> <mappings xmlns="http://dozer.sourceforge.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=
<?xml version="1.0" encoding="UTF-8"?>
<mappings xmlns="http://dozer.sourceforge.net"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://dozer.sourceforge.net http://dozer.sourceforge.net/schema/beanmapping.xsd">
</mappings>
在my pom.xml中插入正确的引用:
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>5.4.0</version>
</dependency>
net.sf.推土机
推土机
5.4.0
为什么?就连我也有同样的问题。问题是因为我没有将mappings.xml(Dozer-Mapping)文件放在src/main/resources路径中,maven将在该路径中使用其依赖项解析名称空间。将文件放在构建路径(src/main/resources)中解决了我的问题 谢谢,
Prasanna。如何在spring上下文中加载dozer xml文件?您好,dozer配置位于contextConfigLocation的xml文件中。
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>5.4.0</version>
</dependency>