jpa work
This commit is contained in:
+2
-2
@@ -25,12 +25,12 @@ import com.google.common.base.Preconditions;
|
||||
@EnableTransactionManagement
|
||||
@PropertySource({ "classpath:persistence-mysql.properties" })
|
||||
@ComponentScan({ "org.baeldung.persistence" })
|
||||
public class PersistenceConfig {
|
||||
public class PersistenceJPAConfig {
|
||||
|
||||
@Autowired
|
||||
private Environment env;
|
||||
|
||||
public PersistenceConfig() {
|
||||
public PersistenceJPAConfig() {
|
||||
super();
|
||||
}
|
||||
|
||||
+5
-6
@@ -1,17 +1,16 @@
|
||||
package org.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
@Configuration
|
||||
// @Configuration
|
||||
@EnableTransactionManagement
|
||||
@ComponentScan({ "org.baeldung.persistence.dao", "org.baeldung.persistence.service" })
|
||||
@ImportResource({ "classpath:hibernate4Config.xml" })
|
||||
public class HibernateXmlConfig {
|
||||
@ComponentScan({ "org.baeldung.persistence" })
|
||||
@ImportResource({ "classpath:jpaConfig.xml" })
|
||||
public class PersistenceJPAConfigXml {
|
||||
|
||||
public HibernateXmlConfig() {
|
||||
public PersistenceJPAConfigXml() {
|
||||
super();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user