私は解決策を見つけようとしましたが、まだ運がありません。
本「Pro Spring 3」(Apppress)[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?
提案 (ctrl+space) を求めようとすると、packagesToScan プロパティがありません。
私は何が欠けていますか?