首页 > 编程语言 > 详细

spring配置entitymangerfactory

时间:2016-03-24 14:38:51      阅读:303      评论:0      收藏:0      [点我收藏+]

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="dataSource" ref="dataSource"/>
    <property name="packagesToScan" value="com"/>
    <property name="jpaVendorAdapter">
        <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
            <property name="showSql" value="true"/>
            <property name="generateDdl" value="true" />
            <property name="databasePlatform" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
        </bean>
    </property>
</bean>

 

报错:

 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?

 

解决:

技术分享

spring配置entitymangerfactory

原文:http://www.cnblogs.com/rixiang/p/5315298.html

(1)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!