Hi all,
given some requests I publish a classresolver for Wicket that enable groovy pages & components to be hot reloaded in development mode.
I suppose you have a project with maven and so let’s start…
- Get the “mighty” GrovvyClassResolver
- (fix up the package)
- Open the WebApplication class and do something like that (remember that I use maven & jetty for dev, If u have a different project structure change the path of the BASE_SRC constant pointing to your source dirs)
-
/** * * @author Byte-Code Srl 2004-2007 */ public class GroovierWebApplication extends WebApplication { public static final String BASE_SRC = "src/main/java/"; protected void init() { initSpringContext(); getResourceSettings().setThrowExceptionOnMissingResource(false); String configurationType = getConfigurationType(); if (configurationType.equals(DEVELOPMENT)) { getResourceSettings().addResourceFolder(BASE_SRC); getApplicationSettings().setClassResolver(new GroovyClassResolver(BASE_SRC)); } } }
-
- You’re done! Now you can develop in wicekt using groovy & hot reload pages and components.
- As a side note remember to create a production profile so when you deploy the war the groovy class are compiled and you won’t loose any performances!
- Ok, now you have to transfer some bucks to my account… or it won’t work!
Ok, that’s all folks, if u have problem just drop me an email!
D
Author: admin
No comments yet.
Comments RSS TrackBack Identifier URI
Leave a comment










No Comments