【发布时间】:2012-04-03 03:45:25
【问题描述】:
您好,我正在构建 spring-hibernate 应用程序。我真的需要从下面配置吗?
<property name="annotatedClasses">
<list>
<value>org.fixus.springer.model.User</value>
</list>
</property>
我在 root-context.xml 中设置了注解驱动
<mvc:annotation-driven />
<context:component-scan base-package="org.fixus.springer" />
<context:component-scan base-package="org.fixus.springer.model" />
现在 hibernate 不应该自动从带有注释 @Entity 的包中获取所有内容并将其转换为 table 吗?至于现在没有 annotatedClasses 他不会从实体创建表
【问题讨论】:
标签: spring hibernate annotations