目前,我用春天套 around。 我的目标是利用日本宇宙开发公司获得使用日本宇宙开发公司名称的网上数据来源。 Im利用春天数据会使我的生活更加容易,并通过一些辅导来获得基本想法。
Bad thing: none of those is talking about the Spring configuration for my JPA szenario + I never worked with JPA / JDBC before. So I hope you can help me out here. I got 2 configuration files:
applicationContext.xml
<bean id="txManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:annotation-driven transaction-manager="txManager" />
<bean id="eManager" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"></bean>
由于在我的代码中使用了@Transactual annotion,在txManager使用由通知驱动的标签。 我不真的确定究竟应该怎样为txManager集思广益,以及会议工具正做些什么。 是否有所有得到支持的XML标签的文件? 我的一位公民没有进口标签?
了解电子管理,但不能确定这样做是否正确。
持久性。
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="spring-jpa">
<jta-data-source>jdbc/myJNDI</jta-data-source>
</persistence-unit>
</persistence>
Same thing here: don t really know what i m doing. I know i need a persistence unit / provider. I know that many are using hibernate for this, but i would like to stay native and use pure JavaEE / Spring if possible. I m just not sure how to configure that. Currently my project is crashing, telling me: "JPA PersistenceProvider returned null"