debop / hibernate-redis

hibernate 2nd level cache privder using redis
Apache License 2.0
357 stars 184 forks source link

allow load default expiry setting from spring application.properties #121

Closed lifecube closed 6 years ago

lifecube commented 6 years ago

If we follow the Readme Doc to put the configuration on spring application properties.

Since we didn't put the value for hibernate.cache.provider_configuration_file_resource_path, RedisCacheUtil will try to find the default file from conf/hibernate-redis.properties. But the file is not exist on the project.

So It will throw NullPointerException before it calls the loadDefaultExpiry(). It will have no chance to load the default expiry value. Once there is a region are trying to use the default value it will always use the hardcoded one 120 instead of the value on properties.

Please check my test cases.

lifecube commented 6 years ago

hi @debop any thoughts of this request