Usando como exemplo o tópico: https://cursos.alura.com.br/forum/topico-multiplos-datasources-76362, tentei conectar em dois BD postgres, no entanto, ocorre o erro:
java.lang.IllegalArgumentException: dataSource or dataSourceClassName or jdbcUrl is required.
at com.zaxxer.hikari.HikariConfig.validate(HikariConfig.java:1029) ~[HikariCP-4.0.3.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:109) ~[HikariCP-4.0.3.jar:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final]
2023-03-21 12:29:14.658 INFO 19996 --- [ restartedMain] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-03-21 12:29:14.674 ERROR 19996 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authEntityManagerFactory' defined in class path resource [com/acreprev/multibd/config/AuthDbConfig.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.25.jar:5.3.25]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.25.jar:5.3.25]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:272) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final]
... 38 common frames omitted
###### O meu application.properties:
// configurações para o banco de dados "b1"
spring.datasource.url=jdbc:postgresql://localhost:5432/b1
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.jdbcUrl=${spring.datasource.url}
// configurações para o banco de dados "b2"
b2.datasource.url=jdbc:postgresql://localhost:5432/b2
b2.spring.datasource.username=postgres
b2.spring.datasource.password=postgres
b2.spring.datasource.driver-class-name=org.postgresql.Driver
b2.datasource.jdbcUrl=${ctc.datasource.url}
As demais classes são igual ao topico citado, Alguma Luz? ultilizo o Spring 2.7