@Target(value={METHOD,TYPE}) @Inherited @Retention(value=RUNTIME) public @interface UrlMapping
PageHandler.
The annotation can be used for methods or types. If a class is annotated with
it, the specified pattern will define a prefix for all annotated method
mappings. The following example shows a handler, which is applicable for all
urls containing master-blog.com/article/:
@PageHandler
@UrlMapping("master-blog.com")
public class BlogPageHandler {
@UrlMapping("/article/")
public void article(ArticlePage articlePage) {
...
}
@UrlMapping("${url.article.comment}")
public void comment(ArticlePage articlePage,CommentFragment commentFragment) {
...
}
}
You can also use spring placeholders as value like in the above example.
public abstract String value
Copyright © 2016. All rights reserved.