Re: freemarker plus javarebel problems...caching?
"Jonathan Chase" <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Attila,
I took your advice - I'm now creating a new BeanWrapper
(DefaultObjectWrapper actually). I do this on every request, and I can't
see a performance hit, so this will work fine for development (I'll turn it
off in production).
Once I figured out how to get hold of the Configuration instance, it was as
easy as:
configuration.setObjectWrapper(new DefaultObjectWrapper());
Thanks for the help!
Jon Chase
For posterity, here's the solution for Spring MVC I used:
public class DebuggingFreeMarkerClassReloaderInterceptor extends
HandlerInterceptorAdapter {
@Autowired
FreeMarkerConfigurer freeMarkerConfigurer;
/** Resets the ObjectWrapper before view is rendered - called on every
request. */
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse
response, Object handler,
ModelAndView modelAndView) throws Exception {
freeMarkerConfigurer.getConfiguration().setObjectWrapper(new
DefaultObjectWrapper());
}
}
On Thu, May 15, 2008 at 6:44 AM, Attila Szegedi <[email protected]> wrote:
>
> On 2008.05.15., at 12:20, ekabanov wrote:
>
> >
> > Sorry, no comments :)
>
> No problem. I'm happy to take my kids out to park this afternoon to
> throw frisbee instead of figuring out how to work around this in order
> to enrich someone's experience with a proprietary product.
>
> Cheers,
> Attila.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user