Aub*_*ine 4 configuration spring packages spring-orm spring-data-jpa
我试图找到解决方案,但仍然没有运气.
我正在关注"Pro Spring 3"(Appress)[第351页]
我已经将项目生成为jpa项目.
据我所知,我可以使用persistence.xml或者可以在bean内部管理它,这就是我想要的.
对于最新的我们需要定义packagesToScan属性.
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaPersonService': Injection of persistence dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emf' defined in class path resource [META-INF/app-context.xml]: Error setting property values; nested exception
is **org.springframework.beans.NotWritablePropertyException: Invalid property 'packagesToScan' of bean class [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Bean property 'packagesToScan' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Run Code Online (Sandbox Code Playgroud)
当我尝试寻求建议(ctrl + space)时,它没有packagesToScan属性.
我错过了什么?
| 归档时间: |
|
| 查看次数: |
10560 次 |
| 最近记录: |