package com.sb.server.web; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Marker annotation which says that a given method should * use a redirect when a trailing slash version is encountered. * * The method should already be annotated with * {@link org.springframework.web.bind.annotation.RequestMapping}. * * @author Ben Fagin * @version 2013-08-22 * @see CustomRequestMappingHandlerMapping */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface RedirectTrailingSlash { /** * The status code to use for the redirect. */ int code() default 301; }