0

I am aware that in Spring boot, we can set properties related to Spring boot and connection pool properties. When we set these properties in a Spring boot application with embedded server, do they take effect?

Also, when we disable embedded tomcat server, and deploy the war file inside a separate tomcat container, do these properties take effect?

For example, I may have following properties:

spring:
datasource:
    jdbc-url: "jdbc:oracle:thin: ...."
    username: "admin"
    password: "admin"
    driver-class-name: "oracle.jdbc.driver.OracleDriver"
    type: "org.apache.tomcat.jdbc.pool.DataSource" 
    tomcat:
        initialSize: 55
        max-wait: 10000
        max-active: 50
        max-idle: 15
        min-idle: 8
        default-autoCommit: false

  1. Do these take effect when I am running the application as a embedded tomcat server (i.e just using jar as packaging format)?
  2. Do these take effect when I am running the application inside Tomcat container and have disabled embedded tomcat container?

Thanks Chetan

Chetan Yewale
  • 192
  • 4
  • 16
  • 1
    It doesn't matter how you package or deploy the settings will always be applied. Unless they are for controlling your server environment (like port etc.) then they don't apply when deploying the application (as you cannot control the external server from within an app). – M. Deinum Sep 30 '20 at 13:38
  • @M.Deinum, thank you for confirming. – Chetan Yewale Sep 30 '20 at 13:53

0 Answers0