码迷,mamicode.com
首页 > 编程语言 > 详细

spring配置entitymangerfactory

时间:2016-03-24 14:42:00      阅读:204      评论: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!