[JAVA-26374-spring-data-jpa-enterprise] Moved articles from spring-data-jpa-enterprise-2 to spring-data-jpa-enterprise (#15103)
This commit is contained in:
parent
76d2612959
commit
da0df4cf8a
|
@ -4,8 +4,7 @@ This module contains articles about Spring Data JPA used in enterprise applicati
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [Spring JPA – Multiple Databases](https://www.baeldung.com/spring-data-jpa-multiple-databases)
|
|
||||||
- [Pagination and Sorting using Spring Data JPA](https://www.baeldung.com/spring-data-jpa-pagination-sorting)
|
|
||||||
|
|
||||||
### Eclipse Config
|
### Eclipse Config
|
||||||
After importing the project into Eclipse, you may see the following error:
|
After importing the project into Eclipse, you may see the following error:
|
||||||
|
|
|
@ -11,6 +11,8 @@ This module contains articles about Spring Data JPA used in enterprise applicati
|
||||||
- [Custom Naming Convention with Spring Data JPA](https://www.baeldung.com/spring-data-jpa-custom-naming)
|
- [Custom Naming Convention with Spring Data JPA](https://www.baeldung.com/spring-data-jpa-custom-naming)
|
||||||
- [Partial Data Update With Spring Data](https://www.baeldung.com/spring-data-partial-update)
|
- [Partial Data Update With Spring Data](https://www.baeldung.com/spring-data-partial-update)
|
||||||
- [Spring Data JPA @Modifying Annotation](https://www.baeldung.com/spring-data-jpa-modifying-annotation)
|
- [Spring Data JPA @Modifying Annotation](https://www.baeldung.com/spring-data-jpa-modifying-annotation)
|
||||||
|
- [Spring JPA – Multiple Databases](https://www.baeldung.com/spring-data-jpa-multiple-databases)
|
||||||
|
- [Pagination and Sorting using Spring Data JPA](https://www.baeldung.com/spring-data-jpa-pagination-sorting)
|
||||||
|
|
||||||
### Eclipse Config
|
### Eclipse Config
|
||||||
After importing the project into Eclipse, you may see the following error:
|
After importing the project into Eclipse, you may see the following error:
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package com.baeldung.multipledb;
|
package com.baeldung.multipledb;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
@ -14,8 +17,7 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||||
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import com.google.common.base.Preconditions;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@PropertySource({"classpath:persistence-multiple-db.properties"})
|
@PropertySource({"classpath:persistence-multiple-db.properties"})
|
|
@ -1,8 +1,15 @@
|
||||||
package com.baeldung.multipledb;
|
package com.baeldung.multipledb;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.*;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
import org.springframework.context.annotation.Profile;
|
||||||
|
import org.springframework.context.annotation.PropertySource;
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||||
|
@ -11,8 +18,7 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||||
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import com.google.common.base.Preconditions;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@PropertySource({"classpath:persistence-multiple-db.properties"})
|
@PropertySource({"classpath:persistence-multiple-db.properties"})
|
|
@ -1,6 +1,10 @@
|
||||||
package com.baeldung.multipledb.model.user;
|
package com.baeldung.multipledb.model.user;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table
|
@Table
|
|
@ -1,9 +1,15 @@
|
||||||
package com.baeldung.multipledb.model.user;
|
package com.baeldung.multipledb.model.user;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "users")
|
@Table(name = "users")
|
||||||
public class User {
|
public class User {
|
Loading…
Reference in New Issue