You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I m trying to have single config properties file for the project, and so giving all the properties (both hikariCP related and project specific properties) in one properties file.
But on server startup, HikariCP trying to set all the properties defined in the properties file and complains that it could not found a setter method for those non-HikariCP specific properties.
Exception thrown is:
... 44 more
Caused by: java.beans.IntrospectionException: Method not found: setTest
at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:93)
at com.zaxxer.hikari.util.PropertyBeanSetter.setProperty(PropertyBeanSetter.java:97)
Is this a bug or working as per design (if working as per design, can we make it not to look for other properties)?
Thanks
The text was updated successfully, but these errors were encountered:
This is as designed. The property setter is reflection based. If the property exists in the file, it tries to set the property on the bean. Without the ability to fail on error, we would loose the ability to inform the user when they have simply misspelled a property.
What other libraries have you found that will silently ignore unknown properties?
I've seen how HikariCP loads the properties file. I see the advantages with this approach: even I mistyped some property name, HikariCP will catch me, for good.
One other thing we can do and still show appropriate message when some required parameter is not present is by looking for required properties in the properties file and then throwing error when not found in the properties file. But, this way we can't handle optional properties - for ex, user is giving some optional property, but with a typo in it's name, then HikariCP can't catch that.
Fair enough. One more dedicated properties file just for HikariCp won't hurt much.
I m trying to have single config properties file for the project, and so giving all the properties (both hikariCP related and project specific properties) in one properties file.
But on server startup, HikariCP trying to set all the properties defined in the properties file and complains that it could not found a setter method for those non-HikariCP specific properties.
Exception thrown is:
Is this a bug or working as per design (if working as per design, can we make it not to look for other properties)?
Thanks
The text was updated successfully, but these errors were encountered: