spring -> spring.jpa
Moved spring to spring.jpa to make room for other spring data integrations.
This commit is contained in:
parent
64e3ebca88
commit
d0cf564f07
|
|
@ -1,9 +1,9 @@
|
|||
import datadog.trace.agent.test.AgentTestRunner
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext
|
||||
import spock.lang.Shared
|
||||
import spring.Customer
|
||||
import spring.CustomerRepository
|
||||
import spring.PersistenceConfig
|
||||
import spring.jpa.Customer
|
||||
import spring.jpa.CustomerRepository
|
||||
import spring.jpa.PersistenceConfig
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package spring;
|
||||
package spring.jpa;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package spring;
|
||||
package spring.jpa;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package spring;
|
||||
package spring.jpa;
|
||||
|
||||
import java.util.Properties;
|
||||
import javax.sql.DataSource;
|
||||
|
|
@ -11,7 +11,7 @@ import org.springframework.orm.jpa.vendor.Database;
|
|||
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@EnableJpaRepositories(basePackages = "spring")
|
||||
@EnableJpaRepositories(basePackages = "spring/jpa")
|
||||
public class PersistenceConfig {
|
||||
|
||||
@Bean(name = "transactionManager")
|
||||
|
|
@ -30,7 +30,7 @@ public class PersistenceConfig {
|
|||
|
||||
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
|
||||
em.setDataSource(dataSource());
|
||||
em.setPackagesToScan("spring");
|
||||
em.setPackagesToScan("spring/jpa");
|
||||
em.setJpaVendorAdapter(vendorAdapter);
|
||||
em.setJpaProperties(additionalProperties());
|
||||
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
import datadog.trace.agent.test.AgentTestRunner
|
||||
import io.opentracing.tag.Tags
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext
|
||||
import spring.Customer
|
||||
import spring.CustomerRepository
|
||||
import spring.PersistenceConfig
|
||||
import spring.jpa.Customer
|
||||
import spring.jpa.CustomerRepository
|
||||
import spring.jpa.PersistenceConfig
|
||||
|
||||
class SpringJpaTest extends AgentTestRunner {
|
||||
def "test CRUD"() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// This file includes software developed at SignalFx
|
||||
|
||||
package spring;
|
||||
package spring.jpa;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// This file includes software developed at SignalFx
|
||||
|
||||
package spring;
|
||||
package spring.jpa;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
// This file includes software developed at SignalFx
|
||||
|
||||
package spring;
|
||||
package spring.jpa;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
|
@ -12,7 +12,7 @@ import org.springframework.orm.jpa.vendor.Database;
|
|||
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@EnableJpaRepositories(basePackages = "spring")
|
||||
@EnableJpaRepositories(basePackages = "spring/jpa")
|
||||
public class PersistenceConfig {
|
||||
|
||||
@Bean(name = "transactionManager")
|
||||
|
|
@ -31,7 +31,7 @@ public class PersistenceConfig {
|
|||
|
||||
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
|
||||
em.setDataSource(dataSource());
|
||||
em.setPackagesToScan("spring");
|
||||
em.setPackagesToScan("spring/jpa");
|
||||
em.setJpaVendorAdapter(vendorAdapter);
|
||||
return em;
|
||||
}
|
||||
Loading…
Reference in New Issue