0

I want some help on an datasource configuration with Tomcat connection pool. Preferably, it should/would be just application.property/yml configurations. Am I correct??

I had the below datasource config in yml which was working in Spring 1.5.8. I am just trying to migrate to 2.O and it is throwing errors as the Hikari CP is the new default connection pool. The migration guide from Pivotal and other questions were tough. Thanks in advance! The below configuration was working fine for me with Spring Boot 1.5.8

datasource:
    url: jdbc:oracle:thin:@domain:port:sid
    username: username
    password: password
    driver-class-name: oracle.jdbc.driver.OracleDriver
    tomcat:
        min-idle: 10
        max-wait: 10000
        max-idle: 20
        max-active: 50
        test-on-borrow: true
4
  • As it stands your question is far too vague, and shows no research at all. It would be better to update your question with what you have already attempted, and ask a more specific question. Otherwise you risk your question being closed due to lack of research effort. Commented May 6, 2018 at 5:04
  • Okay.. Thanks. I will update.. Please let me know if the info updated is enough? Commented May 6, 2018 at 11:33
  • Could you at least provide the error stacktrace? Commented May 7, 2018 at 10:24
  • @AnandVarkeyPhilips [1] It is still not clear what your question is. [2] Saying "it is throwing errors" is far too vague. Be specific, and provide the evidence. [3] I suggest you read [How do I ask a good question?] (stackoverflow.com/help/how-to-ask) and then update your post so it easy for readers to understand what you want. Commented May 9, 2018 at 2:50

1 Answer 1

2

You would want to edit the word "url" to "jdbc-url" so the second line would become jdbc-url: jdbc:oracle:thin:@domain:port:sid

This is because with Spring Boot 2, HikariCP is the default connection pool and associated with that came in new changes in the property keys that will be used to configure the datasource. There are few more of them that has to be defined differently because of HikariCP.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks man.. actuallly That i had found out.. Im stuck in some datasource connection facotry code ..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.