简体   繁体   中英

Is there a way to load string resources from database instead of the wicket properties file?

I need to store the string key value pairs in the database. I want to load them with the Wicket ResourceModel, so no modifications have to be made in the gui part of the application. Is there a way to do that that avoids the overwriting of ComponentStringResourceLoader#loadStringResource() ?

您需要实现IStringResourceLoader ,它从DB读取并使用getResourceSettings().getStringResourceLoaders().add(new MyDbResourceLoader())MyApplication#init()方法中getResourceSettings().getStringResourceLoaders().add(new MyDbResourceLoader())

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM