Chris
Chris

Reputation: 6621

How to config Tomcat pooling datasource out of Spring Boot embedded one?

According to the Spring Boot Doc, we are suggested using Tomcat pooling datasource. If I want to deploy my Spring Boot application as a war file to a standard Tomcat server. How to config the pooling datasource? How to make Spring using the datasource which standard Tomcat provided?

Upvotes: 2

Views: 1008

Answers (1)

geoand
geoand

Reputation: 64059

Do a standard JNDI lookup and expose the resulting DataSource as a Bean (either via XML or Java Config). The pooled data source can then be setup any way you like in a element in Tomcat's context.xml

Upvotes: 1

Related Questions