0

My application uses mysql-connector-java-5.1.48 and I'm trying to migrate to mysql-connector-java-8.0.15. The application currently uses NonRegisteringDriver.parseURL to parse the jdbc url and return the Properties extracted from the URL as follows:

  NonRegisteringDriver driver = new NonRegisteringDriver();
  Properties properties = driver.parseURL(connectUrl, null);

How can I do something similar using the 8.0.x connector version since it no longer has the parseURL API?

seriousgeek
  • 992
  • 3
  • 13
  • 29
  • Seems like an [XY problem](https://meta.stackexchange.com/q/66377/351454) to me. Why are you even parsing the URL in the first place? Only the JDBC driver itself should care what those values are. – Andreas Apr 05 '21 at 15:20
  • It is for security purposes. I would like to allow only the approved set of properties configured in the application. So I use the properties to compare against the allow list and fail the connection if non-allowed properties are used. – seriousgeek Apr 05 '21 at 15:35

0 Answers0