I have a Spring Boot application that connects to two separate databases. Everything works fine (I followed the steps described in the documentation and the tutorial ), although I had to manually configure it to configure the JDBC Tomcat connection pool parameters (because when defining multiple data sources, the boot autoconfiguration is ignored and Spring Boot no longer reads tomcat-specific properties , from application.properties).
When I use the debugger while setting up two data sources, I see that both instances of org.apache.tomcat.jdbc.pool.DataSource have the same connection pool in the DataSource.PoolProperties ["name"] record. See the screenshots below in the debugger, each dataSource () method is configured in a separate configuration class. Note that the same connection pool is defined.

However, from what I see using jConsole + tomcat JMX, there is only one connection pool for which the main database data is configured (URL, credentials, see below).

- Spring . Eclipse Class Decompiler, , Spring, bean-, Spring Boot .
, :
- ,
- Spring ,
2- , . , -, , Spring, Spring Boot, , , .