Add JPA configuration. This fixes a missing Bean error.

This commit is contained in:
Lampros Smyrnaios 2023-06-02 13:00:25 +03:00
parent 8f6426eaf6
commit dc469df9d6
2 changed files with 19 additions and 0 deletions

View File

@ -2,9 +2,11 @@ package eu.dnetlib.repo.manager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableJpaRepositories
@EnableScheduling
public class Application {

View File

@ -0,0 +1,17 @@
package eu.dnetlib.repo.manager.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.orm.jpa.JpaTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;
@Configuration
public class JPAConfig {
@Bean
public PlatformTransactionManager transactionManager() {
return new JpaTransactionManager();
}
}