pon., 14 wrz 2020 o 10:43 Greg Huber <gregh3...@gmail.com> napisał(a):
>
> I have a local modification that I do to speed up my app on how I get
> screen text ie <s:text name="screen.title" /> via
> com.opensymphony.xwork2.util.StrutsLocalizedTextProvider.
>
> By default StrutsLocalizedTextProvider will scan the class packages
> first for the message and then if it cannot find it try
> ApplicationResources.properties.
>
> I use the ApplicationResources.properties for my screen messages and
> then scatter the validation stuff/messages in the packages/classes.  I
> seem to now have alot of packages for my struts classes, so has resulted
> in a lot of scanning for nothing.
>
> Also, maybe only having one ApplicationResources.properties is/was not
> good practice, but makes it easy to manage my screen text, rather than
> duplicating them in many locations.  I think the system does try to do
> some location caching, but it is still slow in comparison.
>
> It is a minor code change, ie scans ApplicationResources.properties
> first, then scans the packages.  I could do a PR to check it out. wdyt?

It would be good if we could switch the behaviour using an option in
config, because scanning packages first allows us to override default
texts from ApplicationResources.properties. Changing the order won't
allow this behaviour.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to