diff options
author | Vitaly Takmazov | 2017-04-07 10:29:52 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-04-07 10:29:52 +0300 |
commit | 9820abe11c0c037f50bb2f7ddbb0bd19646264dc (patch) | |
tree | 5a33901fc294546c40b0cdbc65640b041e4c694e /juick-spring-www/src/main/java/com/juick/www/helpers | |
parent | 6951e2ad47ed4db3dc7d0b08aeadeb09bc3b994d (diff) |
juick-www: merge juick-spring-www i18n, drop thymeleaf
Diffstat (limited to 'juick-spring-www/src/main/java/com/juick/www/helpers')
-rw-r--r-- | juick-spring-www/src/main/java/com/juick/www/helpers/QueryString.java | 14 | ||||
-rw-r--r-- | juick-spring-www/src/main/java/com/juick/www/helpers/QueryStringResolver.java | 31 |
2 files changed, 0 insertions, 45 deletions
diff --git a/juick-spring-www/src/main/java/com/juick/www/helpers/QueryString.java b/juick-spring-www/src/main/java/com/juick/www/helpers/QueryString.java deleted file mode 100644 index 0eb6c76f..00000000 --- a/juick-spring-www/src/main/java/com/juick/www/helpers/QueryString.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.juick.www.helpers; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Created by vt on 22/03/16. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.PARAMETER) -public @interface QueryString { -}
\ No newline at end of file diff --git a/juick-spring-www/src/main/java/com/juick/www/helpers/QueryStringResolver.java b/juick-spring-www/src/main/java/com/juick/www/helpers/QueryStringResolver.java deleted file mode 100644 index 812c4497..00000000 --- a/juick-spring-www/src/main/java/com/juick/www/helpers/QueryStringResolver.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.juick.www.helpers; - -import org.springframework.core.MethodParameter; -import org.springframework.web.bind.support.WebDataBinderFactory; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.method.support.HandlerMethodArgumentResolver; -import org.springframework.web.method.support.ModelAndViewContainer; - -import javax.servlet.http.HttpServletRequest; -import java.lang.annotation.Annotation; -import java.util.Optional; - -public class QueryStringResolver implements HandlerMethodArgumentResolver { - @Override - public boolean supportsParameter(MethodParameter parameter) { - Annotation[] parameterAnnotations = parameter.getParameterAnnotations(); - for (Annotation parameterAnnotation : parameterAnnotations) { - if (QueryString.class.isInstance(parameterAnnotation)) { - return true; - } - } - - return false; - } - - @Override - public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { - HttpServletRequest request = webRequest.getNativeRequest(HttpServletRequest.class); - return Optional.ofNullable(request.getQueryString()); - } -}
\ No newline at end of file |