Spring Boot 查看数据库连接池是哪个连接池。

@SpringBootApplication
@EnableTransactionManagement
public class DemoApplication  implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication  .class, args);
    }

    @Autowired
    DataSource dataSource;

    @Override
    public void run(String... args) throws Exception {
        System.out.println("DATASOURCE = " + dataSource);
    }
}

你可能感兴趣的:(Spring Boot 查看数据库连接池是哪个连接池。)