#506 - Replace custom Eclipselink setup with dedicated starter.
This commit is contained in:
committed by
Oliver Drotbohm
parent
c220ad61fb
commit
3777b06b03
@@ -37,6 +37,14 @@
|
||||
<artifactId>org.eclipse.persistence.jpa</artifactId>
|
||||
<version>${eclipselink.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.zalando.stups</groupId>
|
||||
<artifactId>data-jpa-eclipselink-spring-boot-starter</artifactId>
|
||||
<version>0.10.1</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
|
||||
@@ -15,19 +15,8 @@
|
||||
*/
|
||||
package example.springdata.jpa.eclipselink;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
|
||||
import org.springframework.orm.jpa.vendor.AbstractJpaVendorAdapter;
|
||||
import org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter;
|
||||
import org.springframework.transaction.jta.JtaTransactionManager;
|
||||
|
||||
/**
|
||||
* Spring Boot application that uses EclipseLink as the JPA provider.
|
||||
@@ -37,37 +26,7 @@ import org.springframework.transaction.jta.JtaTransactionManager;
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class Application extends JpaBaseConfiguration {
|
||||
|
||||
/**
|
||||
* @param dataSource
|
||||
* @param properties
|
||||
* @param jtaTransactionManagerProvider
|
||||
*/
|
||||
protected Application(DataSource dataSource, JpaProperties properties,
|
||||
ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider) {
|
||||
super(dataSource, properties, jtaTransactionManagerProvider);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration#createJpaVendorAdapter()
|
||||
*/
|
||||
@Override
|
||||
protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
|
||||
return new EclipseLinkJpaVendorAdapter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration#getVendorProperties()
|
||||
*/
|
||||
@Override
|
||||
protected Map<String, Object> getVendorProperties() {
|
||||
|
||||
// Turn off dynamic weaving to disable LTW lookup in static weaving mode
|
||||
return Collections.singletonMap("eclipselink.weaving", "false");
|
||||
}
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user