Size: a a a

Spring Framework and more

2019 November 26

И

Илья in Spring Framework and more
Why don’t you use builder in firstEntityManagerFactory ?
источник

И

Илья in Spring Framework and more
Do you have the same name (@Bean("DataSource»)) in bean defenition in secondDataSource ?
источник

T

Tom in Spring Framework and more
Илья
Do you have the same name (@Bean("DataSource»)) in bean defenition in secondDataSource ?
no I have a different name in second class
источник

T

Tom in Spring Framework and more
Илья
Why don’t you use builder in firstEntityManagerFactory ?
I get an error from intellij
источник

И

Илья in Spring Framework and more
What  spring version do you use?
источник

И

Илья in Spring Framework and more
spring-boot version*
источник

T

Tom in Spring Framework and more
2.1.3
источник

И

Илья in Spring Framework and more
What do you have in main class  ?
источник

T

Tom in Spring Framework and more
Илья
What do you have in main class  ?
@Configuration
@EnableScheduling
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
@EnableTransactionManagement
public class App {

   public static void main(String[] args) throws IOException, NoSuchAlgorithmException, InvalidKeyException, UnirestException {

       SpringApplication.
run(App.class, args);

   }

}
источник

И

Илья in Spring Framework and more
Remove  exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class}
источник

И

Илья in Spring Framework and more
I think it will help you
источник

T

Tom in Spring Framework and more
Илья
Remove  exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class}
just tried, still same error 🙁
источник

И

Илья in Spring Framework and more
But it should let use builder in EntityManagerFactory
источник

T

Tom in Spring Framework and more
Илья
But it should let use builder in EntityManagerFactory
yeah, no idea why not but I doubt that that causes the error
источник

T

Tom in Spring Framework and more
Any other idea how to fix that?
источник

И

Илья in Spring Framework and more
I just compiled this code (https://github.com/jahe/spring-boot-multiple-datasources) and changed spring version. And it works perfect
источник

T

Tom in Spring Framework and more
Well then something else is completely wrong in my app and I have no idea what
источник

И

Илья in Spring Framework and more
Tom
Well then something else is completely wrong in my app and I have no idea what
I can’t say what wrong while you don’t share all code.
источник

T

Tom in Spring Framework and more
Илья
I can’t say what wrong while you don’t share all code.
Its propriatery code, I am not allowed to share everything unfortunately
источник

И

Илья in Spring Framework and more
I just can say that you need to try to do the same code like this https://github.com/jahe/spring-boot-multiple-datasources
источник