s-n*_*n-2 1 java intellij-idea
我创建了一个 Java 应用程序用户 IntelliJ IDEA,当我配置 时Dept.hbm.xml,出现错误:
无法解析包 ypd ...
但是可以看到,目录lib是:
src/main/java/com/ypd...
Run Code Online (Sandbox Code Playgroud)
我的代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/xsd/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.ypd.sp.entity">
</hibernate-mapping>
Run Code Online (Sandbox Code Playgroud)
为什么我收到这个错误?
编辑
我的pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId>
<artifactId>SpringAndHibernate</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
Run Code Online (Sandbox Code Playgroud)
编辑
如果在项目结构中,我将包作为源根,没有办法,为什么?
| 归档时间: |
|
| 查看次数: |
2981 次 |
| 最近记录: |