Commit db73985f authored by liaozan's avatar liaozan 🏀

Polish

parent ceb6325e
...@@ -12,7 +12,9 @@ import java.util.stream.Stream; ...@@ -12,7 +12,9 @@ import java.util.stream.Stream;
import java.util.stream.StreamSupport; import java.util.stream.StreamSupport;
import static java.util.Collections.emptyList; import static java.util.Collections.emptyList;
import static java.util.stream.Collectors.*; import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.mapping;
/** /**
* @author liaozan * @author liaozan
......
...@@ -8,7 +8,10 @@ import java.io.Serializable; ...@@ -8,7 +8,10 @@ import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.schbrain.common.constants.PageConstants.*; import static com.schbrain.common.constants.PageConstants.DEFAULT_PAGE_INDEX;
import static com.schbrain.common.constants.PageConstants.DEFAULT_PAGE_SIZE;
import static com.schbrain.common.constants.PageConstants.DEFAULT_TOTAL_COUNT;
import static com.schbrain.common.constants.PageConstants.DEFAULT_TOTAL_PAGE_COUNT;
/** /**
* @author liaozan * @author liaozan
......
...@@ -16,25 +16,25 @@ public class ContentCachingServletUtils { ...@@ -16,25 +16,25 @@ public class ContentCachingServletUtils {
/** /**
* Make request content cacheable to avoid stream closed error after inputStream closed * Make request content cacheable to avoid stream closed error after inputStream closed
*/ */
public static HttpServletRequest wrapRequestIfRequired(HttpServletRequest request) { public static ContentCachingRequestWrapper wrapRequestIfRequired(HttpServletRequest request) {
Assert.notNull(request, "request must not be null"); Assert.notNull(request, "request must not be null");
if (request instanceof ContentCachingRequestWrapper) { if (request instanceof ContentCachingRequestWrapper) {
return request; return (ContentCachingRequestWrapper) request;
} else { } else {
return new ContentCachingRequestWrapper(request); return new ContentCachingRequestWrapper(request, request.getContentLength());
} }
} }
/** /**
* Make response content cacheable to avoid stream closed error after outputStream closed * Make response content cacheable to avoid stream closed error after outputStream closed
*/ */
public static HttpServletResponse wrapResponseIfRequired(HttpServletResponse response) { public static ContentCachingResponseWrapper wrapResponseIfRequired(HttpServletResponse response) {
Assert.notNull(response, "response must not be null"); Assert.notNull(response, "response must not be null");
if (response instanceof ContentCachingResponseWrapper) { if (response instanceof ContentCachingResponseWrapper) {
return response; return (ContentCachingResponseWrapper) response;
} else { } else {
return new ContentCachingResponseWrapper(response); return new ContentCachingResponseWrapper(response);
} }
} }
} }
\ No newline at end of file
...@@ -2,8 +2,8 @@ package com.schbrain.framework.autoconfigure.apollo; ...@@ -2,8 +2,8 @@ package com.schbrain.framework.autoconfigure.apollo;
import com.ctrip.framework.apollo.Config; import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService; import com.ctrip.framework.apollo.ConfigService;
import com.schbrain.framework.autoconfigure.apollo.config.OrderedMapPropertySource;
import com.schbrain.common.util.support.ConfigurableProperties; import com.schbrain.common.util.support.ConfigurableProperties;
import com.schbrain.framework.autoconfigure.apollo.config.OrderedMapPropertySource;
import com.schbrain.framework.autoconfigure.apollo.event.ConfigLoadedEvent; import com.schbrain.framework.autoconfigure.apollo.event.ConfigLoadedEvent;
import com.schbrain.framework.autoconfigure.apollo.event.listener.ConfigLoadedEventListener; import com.schbrain.framework.autoconfigure.apollo.event.listener.ConfigLoadedEventListener;
import com.schbrain.framework.autoconfigure.apollo.properties.ApolloProperties; import com.schbrain.framework.autoconfigure.apollo.properties.ApolloProperties;
......
...@@ -18,7 +18,9 @@ import java.lang.reflect.Field; ...@@ -18,7 +18,9 @@ import java.lang.reflect.Field;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.util.Map; import java.util.Map;
import static org.springframework.beans.factory.config.PlaceholderConfigurerSupport.*; import static org.springframework.beans.factory.config.PlaceholderConfigurerSupport.DEFAULT_PLACEHOLDER_PREFIX;
import static org.springframework.beans.factory.config.PlaceholderConfigurerSupport.DEFAULT_PLACEHOLDER_SUFFIX;
import static org.springframework.beans.factory.config.PlaceholderConfigurerSupport.DEFAULT_VALUE_SEPARATOR;
/** /**
* @author liaozan * @author liaozan
......
...@@ -7,7 +7,9 @@ import lombok.Getter; ...@@ -7,7 +7,9 @@ import lombok.Getter;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import static java.lang.invoke.MethodHandles.*; import static java.lang.invoke.MethodHandles.Lookup;
import static java.lang.invoke.MethodHandles.lookup;
import static java.lang.invoke.MethodHandles.privateLookupIn;
/** /**
* @author liaozan * @author liaozan
......
...@@ -15,7 +15,9 @@ import lombok.extern.slf4j.Slf4j; ...@@ -15,7 +15,9 @@ import lombok.extern.slf4j.Slf4j;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import static com.schbrain.framework.autoconfigure.mybatis.constant.MybatisConstants.*; import static com.schbrain.framework.autoconfigure.mybatis.constant.MybatisConstants.CREATE_TIME;
import static com.schbrain.framework.autoconfigure.mybatis.constant.MybatisConstants.DELETE_VERSION;
import static com.schbrain.framework.autoconfigure.mybatis.constant.MybatisConstants.MODIFY_TIME;
/** /**
* @author liaozan * @author liaozan
...@@ -56,4 +58,4 @@ public class DefaultMethodSqlInjector extends AbstractSqlInjector { ...@@ -56,4 +58,4 @@ public class DefaultMethodSqlInjector extends AbstractSqlInjector {
return methodList; return methodList;
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment