Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java LocalSessionFactoryBean从Hibernate 3迁移到4.3中的配置类属性_Java_Spring_Hibernate - Fatal编程技术网

Java LocalSessionFactoryBean从Hibernate 3迁移到4.3中的配置类属性

Java LocalSessionFactoryBean从Hibernate 3迁移到4.3中的配置类属性,java,spring,hibernate,Java,Spring,Hibernate,在迁移到Hibernate 4.3时,我遇到了一个关于bean注入中配置类利用率的小问题 我注入的配置类重写org.hibernate.cfg.configuration类中的某些方法,如validateSchema() 在Hibernate 3中,我的配置文件中有这个选项,它之所以有效是因为configurationClass的get/set方法存在: <bean id="SessionFactory" class="org.springframework.orm.hibernate3.

在迁移到Hibernate 4.3时,我遇到了一个关于bean注入中配置类利用率的小问题

我注入的配置类重写org.hibernate.cfg.configuration类中的某些方法,如validateSchema()

在Hibernate 3中,我的配置文件中有这个选项,它之所以有效是因为configurationClass的get/set方法存在:

<bean id="SessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">

    <property name="dataSource">
        <ref bean="$[DATA_SOURCE]" />
    </property>

    <property name="entityInterceptor">
        <ref bean="entityInterceptor"/>
    </property>

    <property name="configurationClass">
        <value>com.hibernate.cfg.CustomSchemaValidationConfiguration</value>    
    </property>
问题是我仍然想要/需要使用que配置类。
我在代码中看到了很多示例,但我想继续使用spring注入方式。可能吗?有什么建议吗?

没有更多的配置类,仍然存在的支持正在消失。有一个全新的配置模型,您必须调整您的解决方案以适应它。@M.Deinum您有什么我可以查找的吗?无论是通过bean还是关于新模型的代码?没有更多的配置类,仍然存在的支持正在消失。有一个全新的配置模型,您必须调整您的解决方案以适应它。@M.Deinum您有什么我可以查找的吗?是通过bean还是关于新模型的代码?
Invalid property 'configurationClass' of bean class [org.springframework.orm.hibernate4.LocalSessionFactoryBean]: Bean property 'configurationClass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?