wei 5 years ago
parent
commit
fe5457e6dc
32 changed files with 1292 additions and 0 deletions
  1. 1 0
      base-springframework/.gitignore
  2. 4 0
      base-springframework/base-springframework-core/.gitignore
  3. 7 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/CoreConfiguration.java
  4. 22 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/config/MyServiceModelToSwagger2Mapper.java
  5. 45 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/config/Swagger2Config.java
  6. 15 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/enums/RestfulEnum.java
  7. 54 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/env/InitializeCustomConfiguration.java
  8. 38 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/http/converter/FastJsonConverter.java
  9. 37 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/http/converter/ParameterFilter.java
  10. 198 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/http/converter/ParameterRequestWrapper.java
  11. 20 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/log/config/LogProperty.java
  12. 61 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/vo/RestfulVO.java
  13. 26 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/config/ResponseHandlerConfigure.java
  14. 14 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/exception/BaseException.java
  15. 53 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/exception/ServiceException.java
  16. 143 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/handler/BaseExceptionHandler.java
  17. 53 0
      base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/handler/ResponseHandler.java
  18. 6 0
      base-springframework/base-springframework-core/src/main/resources/META-INF/spring.factories
  19. 15 0
      base-springframework/base-springframework-core/src/main/resources/common-application.yml
  20. 24 0
      base-springframework/base-springframework-mysql/src/main/java/com/wei/base/springframework/mysql/config/MybatisPlusConfig.java
  21. 47 0
      base-springframework/base-springframework-mysql/src/main/java/com/wei/base/springframework/mysql/constants/GeneratorParam.java
  22. 54 0
      base-springframework/base-springframework-mysql/src/main/java/com/wei/base/springframework/mysql/env/InitializeCustomConfiguration.java
  23. 41 0
      base-springframework/base-springframework-mysql/src/main/resources/templates/controller.java.ftl
  24. 14 0
      base-springframework/base-springframework-mysql/src/main/resources/templates/mapstruct.java.ftl
  25. 29 0
      base-springframework/base-springframework-mysql/src/main/resources/templates/serviceImpl.java.ftl
  26. 3 0
      base-springframework/base-springframework-util/.gitignore
  27. 18 0
      base-springframework/base-springframework-util/src/main/java/com/wei/base/springframework/util/RegexUtil.java
  28. 125 0
      base-springframework/base-springframework-util/src/main/java/com/wei/base/springframework/util/StringUtil.java
  29. 5 0
      base-springframework/base-springframework-util/src/main/resources/META-INF/spring.factories
  30. 87 0
      pom.xml
  31. 33 0
      wei-test/src/main/java/com/wei/test/vo/UserVO.java
  32. 0 0
      wei-test/src/main/resources/application.yml

+ 1 - 0
base-springframework/.gitignore

@@ -0,0 +1 @@
+/.project

+ 4 - 0
base-springframework/base-springframework-core/.gitignore

@@ -0,0 +1,4 @@
+/target/
+/.classpath
+/.settings/
+/.project

+ 7 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/CoreConfiguration.java

@@ -0,0 +1,7 @@
+package com.wei.base.springframework.core;
+
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan
+public class CoreConfiguration {
+}

+ 22 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/config/MyServiceModelToSwagger2Mapper.java

@@ -0,0 +1,22 @@
+//package com.wei.base.springframework.core.config;
+//
+//import io.swagger.models.Swagger;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.Primary;
+//import springfox.documentation.service.Documentation;
+//import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2MapperImpl;
+//
+//@Primary
+//@Configuration
+//public class MyServiceModelToSwagger2Mapper extends ServiceModelToSwagger2MapperImpl {
+//
+//    /**
+//     * 是否需要封装swagger返回值
+//     */
+//    @Override
+//    public Swagger mapDocumentation(Documentation from) {
+//        from.getApiListings()
+//        Swagger swagger = super.mapDocumentation(from);
+//        return swagger;
+//    }
+//}

+ 45 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/config/Swagger2Config.java

@@ -0,0 +1,45 @@
+//package com.wei.base.springframework.core.config;
+//
+//import com.google.common.collect.Lists;
+//import io.swagger.annotations.ApiOperation;
+//import io.swagger.annotations.SwaggerDefinition;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import springfox.documentation.builders.ApiInfoBuilder;
+//import springfox.documentation.builders.ParameterBuilder;
+//import springfox.documentation.builders.PathSelectors;
+//import springfox.documentation.builders.RequestHandlerSelectors;
+//import springfox.documentation.schema.ModelRef;
+//import springfox.documentation.service.ApiInfo;
+//import springfox.documentation.service.Parameter;
+//import springfox.documentation.spi.DocumentationType;
+//import springfox.documentation.spring.web.plugins.Docket;
+//import springfox.documentation.swagger2.annotations.EnableSwagger2;
+//
+//import java.util.List;
+//
+//@SwaggerDefinition
+//@EnableSwagger2
+//@Configuration
+//public class Swagger2Config {
+//
+//    @Bean
+//    public Docket createRestApi() {
+//        List<Parameter> pars = Lists.newArrayList();
+//        ParameterBuilder tokenPar = new ParameterBuilder();
+//        // header中的token参数非必填,传空也可以
+//        tokenPar.name("x-auth-token").modelRef(new ModelRef("string")).
+//                parameterType("header").required(false).build();
+//        pars.add(tokenPar.build());
+//
+//        return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
+//                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+//                .paths(PathSelectors.any()).build().globalOperationParameters(pars);
+//    }
+//
+//    private ApiInfo apiInfo() {
+//        return new ApiInfoBuilder().title("Spring Boot中使用Swagger2构建RESTful APIs").description("字母大小写转换")
+//                .termsOfServiceUrl("https://www.iamwawa.cn/daxiaoxie.html").version("1.0").license("服务监控")
+//                .licenseUrl("/monitoring").build();
+//    }
+//}

+ 15 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/enums/RestfulEnum.java

@@ -0,0 +1,15 @@
+package com.wei.base.springframework.core.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@Getter
+@AllArgsConstructor
+public enum RestfulEnum {
+
+    SUCCESS(0, "success"), FAIL(9999, "fail");
+
+    public Integer code;
+
+    public String msg;
+}

+ 54 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/env/InitializeCustomConfiguration.java

@@ -0,0 +1,54 @@
+package com.wei.base.springframework.core.env;
+
+import com.google.common.collect.Lists;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.env.EnvironmentPostProcessor;
+import org.springframework.core.env.ConfigurableEnvironment;
+import org.springframework.core.env.PropertiesPropertySource;
+import org.springframework.core.env.PropertySource;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * 加载自定义配置文件
+ *
+ * @author : weierming
+ * @date : 2020/7/13
+ */
+public class InitializeCustomConfiguration implements EnvironmentPostProcessor {
+
+    //Properties对象
+    private final Properties PROPERTIES = new Properties();
+
+    //自定义配置文件地址
+    private static final List<String> PROFILES = Lists.newArrayList("common-application.yml");
+
+    @Override
+    public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
+        PROFILES.stream().forEach(profile -> {
+            //从classpath路径下面查找文件
+            Resource resource = new ClassPathResource(profile);
+            //加载成PropertySource对象,并添加到Environment环境中
+            environment.getPropertySources().addLast(loadProfiles(resource));
+        });
+    }
+
+    //加载单个配置文件
+    private PropertySource<?> loadProfiles(Resource resource) {
+        if (resource == null || !resource.exists()) {
+            throw new IllegalArgumentException("资源" + resource + "不存在");
+        }
+
+        try {
+            //从输入流中加载一个Properties对象
+            PROPERTIES.load(resource.getInputStream());
+            return new PropertiesPropertySource(resource.getFilename(), PROPERTIES);
+        } catch (IOException ex) {
+            throw new IllegalStateException("加载配置文件失败" + resource, ex);
+        }
+    }
+}

+ 38 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/http/converter/FastJsonConverter.java

@@ -0,0 +1,38 @@
+package com.wei.base.springframework.core.http.converter;
+
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.alibaba.fastjson.support.config.FastJsonConfig;
+import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
+import com.google.common.base.Charsets;
+import com.google.common.collect.Lists;
+import com.wei.base.springframework.core.web.config.ResponseHandlerConfigure;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.MediaType;
+import org.springframework.http.converter.HttpMessageConverter;
+
+@Configuration
+public class FastJsonConverter {
+
+    @Autowired
+    private ResponseHandlerConfigure responseHandlerConfigure;
+
+    @Bean
+    public HttpMessageConverter<Object> configureMessageConverters() {
+        FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
+
+        FastJsonConfig fastJsonConfig = new FastJsonConfig();
+        fastJsonConfig.setCharset(Charsets.UTF_8);
+        fastJsonConfig.setDateFormat(responseHandlerConfigure.getDateFormat());
+
+        // null值是否返回,默认为不返回
+        if (responseHandlerConfigure.getIsWriteMapNullValue()) {
+            fastJsonConfig.setSerializerFeatures(SerializerFeature.WriteMapNullValue);
+        }
+
+        fastConverter.setFastJsonConfig(fastJsonConfig);
+        fastConverter.setSupportedMediaTypes(Lists.newArrayList(MediaType.APPLICATION_JSON));
+        return fastConverter;
+    }
+}

+ 37 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/http/converter/ParameterFilter.java

@@ -0,0 +1,37 @@
+package com.wei.base.springframework.core.http.converter;
+
+import org.springframework.stereotype.Component;
+
+import javax.servlet.*;
+import javax.servlet.annotation.WebFilter;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ * 入参拦截器
+ *
+ * @author : weierming
+ * @date : 2020/7/14
+ */
+@Component
+@WebFilter(urlPatterns = "/**", filterName = "ParamsFilter", dispatcherTypes = DispatcherType.REQUEST)
+public class ParameterFilter implements Filter {
+
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
+            throws IOException, ServletException {
+        HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+        ParameterRequestWrapper parmsRequest = new ParameterRequestWrapper(httpServletRequest);
+        filterChain.doFilter(parmsRequest, response);
+    }
+
+    @Override
+    public void destroy() {
+
+    }
+
+    @Override
+    public void init(FilterConfig arg0) throws ServletException {
+
+    }
+}

+ 198 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/http/converter/ParameterRequestWrapper.java

@@ -0,0 +1,198 @@
+package com.wei.base.springframework.core.http.converter;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.base.Charsets;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.wei.base.springframework.util.StringUtil;
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.io.IOUtils;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+
+import javax.servlet.ReadListener;
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 请求参数处理器
+ *
+ * @author : weierming
+ * @date : 2020/7/14
+ */
+public class ParameterRequestWrapper extends HttpServletRequestWrapper {
+
+    private Map<String, String[]> params = Maps.newHashMap();
+
+    private static final String CHARSET_NAME = Charsets.UTF_8.name();
+
+    public ParameterRequestWrapper(HttpServletRequest request) {
+        // 将request交给父类,以便于调用对应方法的时候,将其输出,其实父亲类的实现方式和第一种new的方式类似
+        super(request);
+        // 将参数表,赋予给当前的Map以便于持有request中的参数
+        Map<String, String[]> requestMap = request.getParameterMap();
+        params.putAll(requestMap);
+        //
+        modifyParameterValues();
+    }
+
+    /**
+     * 重写getInputStream方法 post类型的请求参数必须通过流才能获取到值
+     */
+    @Override
+    public ServletInputStream getInputStream() throws IOException {
+        // 非json类型,直接返回
+        try {
+            if (!super.getHeader(HttpHeaders.CONTENT_TYPE).equalsIgnoreCase(MediaType.APPLICATION_JSON_VALUE)) {
+                return super.getInputStream();
+            }
+
+            // 为空,直接返回
+            String json = IOUtils.toString(super.getInputStream(), CHARSET_NAME);
+            if (StringUtil.isEmpty(json)) {
+                return super.getInputStream();
+            }
+
+            ByteArrayInputStream bis = null;
+            try {
+                Map<String, Object> map = JSON.parseObject(json);
+                mapTrim(map);
+
+                bis = new ByteArrayInputStream(JSON.toJSONString(map).getBytes(CHARSET_NAME));
+            } catch (Exception e) {
+                JSONArray jsonArray = JSON.parseArray(json);
+                if (jsonArray.isEmpty()) {
+                    bis = new ByteArrayInputStream(JSON.toJSONString(jsonArray).getBytes(CHARSET_NAME));
+                    return new MyServletInputStream(bis);
+                }
+
+                List<Map<String, Object>> list = Lists.newArrayListWithCapacity(jsonArray.size());
+                jsonArray.stream().forEach(vo -> {
+                    Map<String, Object> map = (Map<String, Object>) vo;
+                    mapTrim(map);
+
+                    list.add(map);
+                });
+
+                bis = new ByteArrayInputStream(JSON.toJSONString(list).getBytes(CHARSET_NAME));
+            }
+
+            return new MyServletInputStream(bis);
+        } catch (Exception e) {
+            return super.getInputStream();
+        }
+    }
+
+    /**
+     * map value去空格
+     *
+     * @param map
+     */
+    private void mapTrim(Map<String, Object> map) {
+        if (MapUtils.isEmpty(map)) {
+            return;
+        }
+
+        Set<String> set = map.keySet();
+        Iterator<String> it = set.iterator();
+
+        while (it.hasNext()) {
+            String key = it.next();
+            Object values = map.get(key);
+            if (values instanceof String) {
+                values = StringUtil.trim((String) values);
+            } else if (values instanceof JSONArray) {
+                // 如果是数组且不为空则循环将value中的空格去除
+                JSONArray jsonArray = (JSONArray) values;
+                if (!jsonArray.isEmpty()) {
+                    List<Map<String, Object>> list = Lists.newArrayListWithExpectedSize(jsonArray.size());
+                    jsonArray.stream().forEach(json -> {
+                        Map<String, Object> jsonMap = (Map<String, Object>) json;
+                        mapTrim(jsonMap);
+
+                        list.add(jsonMap);
+                    });
+
+                    values = list;
+                }
+            } else if (values instanceof JSONObject) {
+                Map<String, Object> jsonMap = (Map<String, Object>) values;
+                mapTrim(jsonMap);
+                values = jsonMap;
+            }
+
+            map.put(key, values);
+        }
+    }
+
+    /**
+     * 将parameter的值去除空格后重写回去
+     */
+    public void modifyParameterValues() {
+        Set<String> set = params.keySet();
+        Iterator<String> it = set.iterator();
+        while (it.hasNext()) {
+            String key = (String) it.next();
+            String[] values = params.get(key);
+            values[0] = values[0].trim();
+            params.put(key, values);
+        }
+    }
+
+    /**
+     * 重写getParameter 参数从当前类中的map获取
+     */
+    @Override
+    public String getParameter(String name) {
+        String[] values = params.get(name);
+        if (values == null || values.length == 0) {
+            return null;
+        }
+        return values[0];
+    }
+
+    /**
+     * 重写getParameterValues
+     */
+    @Override
+    public String[] getParameterValues(String name) {// 同上
+        return params.get(name);
+    }
+
+    class MyServletInputStream extends ServletInputStream {
+        private ByteArrayInputStream bis;
+
+        public MyServletInputStream(ByteArrayInputStream bis) {
+            this.bis = bis;
+        }
+
+        @Override
+        public boolean isFinished() {
+            return true;
+        }
+
+        @Override
+        public boolean isReady() {
+            return true;
+        }
+
+        @Override
+        public void setReadListener(ReadListener listener) {
+
+        }
+
+        @Override
+        public int read() throws IOException {
+            return bis.read();
+        }
+    }
+}

+ 20 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/log/config/LogProperty.java

@@ -0,0 +1,20 @@
+package com.wei.base.springframework.core.log.config;
+
+import ch.qos.logback.core.PropertyDefinerBase;
+import com.wei.base.springframework.util.StringUtil;
+
+/**
+ * 日志配置文件 由于日志会在spring之前先进行加载没办法通过spring来配置动态化
+ *
+ * @author : weierming
+ * @date : 2020/7/10
+ */
+public class LogProperty extends PropertyDefinerBase {
+
+    private static final String LOG_PATH = System.getProperty("user.dir");
+
+    @Override
+    public String getPropertyValue() {
+        return StringUtil.substringAfterLast(LOG_PATH, "/");
+    }
+}

+ 61 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/vo/RestfulVO.java

@@ -0,0 +1,61 @@
+package com.wei.base.springframework.core.vo;
+
+import com.wei.base.springframework.core.enums.RestfulEnum;
+import com.wei.base.springframework.core.web.exception.ServiceException;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * 统一返回值
+ *
+ * @author : weierming
+ * @date : 2020/7/10
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class RestfulVO<T> implements Serializable {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -5551289026614581502L;
+
+    private Integer code;
+
+    private String message;
+
+    private T data;
+
+    public RestfulVO(T data) {
+        code = RestfulEnum.SUCCESS.code;
+        message = RestfulEnum.SUCCESS.msg;
+        this.data = data;
+    }
+
+    public RestfulVO<T> fail(T data) {
+        code = RestfulEnum.FAIL.code;
+        message = RestfulEnum.FAIL.msg;
+        this.data = data;
+
+        return this;
+    }
+
+    public RestfulVO(ServiceException e) {
+        code = e.getCode();
+        message = e.getMessage();
+    }
+
+    public RestfulVO(ServiceException e, String msg) {
+        code = e.getCode();
+        message = msg;
+    }
+
+    public RestfulVO(RestfulEnum restfulEnum, String msg) {
+        code = restfulEnum.getCode();
+        message = msg;
+    }
+}

+ 26 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/config/ResponseHandlerConfigure.java

@@ -0,0 +1,26 @@
+package com.wei.base.springframework.core.web.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+@Data
+@ConfigurationProperties(prefix = "spring.response-body-advice")
+@Configuration
+public class ResponseHandlerConfigure {
+
+    /**
+     * 是否启用返回值封装 默认为true
+     */
+    private Boolean enabled = Boolean.TRUE;
+
+    /**
+     * null值是否返回,默认为不返回
+     */
+    private Boolean isWriteMapNullValue = Boolean.FALSE;
+
+    /**
+     * 返回值时间格式
+     */
+    private String dateFormat = "yyyy-MM-dd HH:mm:ss";
+}

+ 14 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/exception/BaseException.java

@@ -0,0 +1,14 @@
+package com.wei.base.springframework.core.web.exception;
+
+/**
+ * 公共异常类
+ *
+ * @author : weierming
+ * @date : 2020/7/10
+ */
+public interface BaseException {
+
+    Integer getCode();
+
+    String getMsg();
+}

+ 53 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/exception/ServiceException.java

@@ -0,0 +1,53 @@
+package com.wei.base.springframework.core.web.exception;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+public class ServiceException extends RuntimeException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = -3566267379569477434L;
+
+    private Integer code;
+
+    private String message;
+
+    public ServiceException(BaseException baseException) {
+        code = baseException.getCode();
+        message = baseException.getMsg();
+    }
+
+    public ServiceException(BaseException baseException, String... msgs) {
+        code = baseException.getCode();
+
+        StringBuilder stringBuilder = new StringBuilder();
+        if (msgs != null && msgs.length > 0) {
+            for (String msg : msgs) {
+                stringBuilder.append(msg + ",");
+            }
+        }
+
+        stringBuilder.setLength(stringBuilder.length() - 1);
+        message = String.format(baseException.getMsg(), stringBuilder.toString());
+    }
+
+    public ServiceException(BaseException baseException, Long... msgs) {
+        code = baseException.getCode();
+
+        StringBuilder stringBuilder = new StringBuilder();
+        if (msgs != null && msgs.length > 0) {
+            for (Long msg : msgs) {
+                stringBuilder.append(msg + ",");
+            }
+        }
+
+        stringBuilder.setLength(stringBuilder.length() - 1);
+        message = String.format(baseException.getMsg(), stringBuilder.toString());
+    }
+}

+ 143 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/handler/BaseExceptionHandler.java

@@ -0,0 +1,143 @@
+package com.wei.base.springframework.core.web.handler;
+
+import com.wei.base.springframework.core.enums.RestfulEnum;
+import com.wei.base.springframework.core.vo.RestfulVO;
+import com.wei.base.springframework.core.web.exception.ServiceException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.converter.HttpMessageNotReadableException;
+import org.springframework.validation.ObjectError;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.MissingServletRequestParameterException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.List;
+
+/**
+ * 公共异常处理类
+ *
+ * @author admin
+ */
+@Slf4j
+@ControllerAdvice
+public class BaseExceptionHandler {
+
+    @Value("${debug:false}")
+    private boolean debug;
+
+    /**
+     * 拦截ServletException类的异常
+     *
+     * @param e
+     * @return
+     */
+    @ExceptionHandler(ServiceException.class)
+    @ResponseBody
+    public RestfulVO<String> servletException(ServiceException e) {
+        log.error(e.getMessage(), e);
+        return new RestfulVO<>(e);
+    }
+
+    /**
+     * 空指针异常要做单独封装 不然返回null时data会被过滤掉
+     *
+     * @param e
+     * @return
+     */
+    @ExceptionHandler(NullPointerException.class)
+    @ResponseBody
+    public RestfulVO<String> servletException(NullPointerException e) {
+        log.error(e.getMessage(), e);
+        return new RestfulVO<>(RestfulEnum.FAIL, "系统错误!");
+    }
+
+//    @ExceptionHandler(HystrixRuntimeException.class)
+//    @ResponseBody
+//    public RestfulVO<String> hystrixRuntimeException(HystrixRuntimeException e) {
+//        log.error(e.getMessage(), e.getCause());
+//        return new RestfulVO<>(RestfulEnum.FAIL, "系统错误!");
+//    }
+
+    /**
+     * 封装javax.validation.Valid抛出的错误
+     *
+     * @param e
+     * @return
+     */
+    @ExceptionHandler(MethodArgumentNotValidException.class)
+    @ResponseBody
+    public RestfulVO<String> methodArgumentNotValidException(MethodArgumentNotValidException e) {
+        log.error(e.getMessage(), e);
+        List<ObjectError> allErrors = e.getBindingResult().getAllErrors();
+        StringBuilder stringBuilder = new StringBuilder();
+
+        allErrors.forEach(vo -> {
+            stringBuilder.append(vo.getDefaultMessage().toString() + ";");
+        });
+        return new RestfulVO<>(RestfulEnum.FAIL, stringBuilder.toString());
+    }
+
+    /**
+     * 封装javax.validation抛出的错误
+     *
+     * @param e
+     * @return
+     */
+//    @ExceptionHandler(ConstraintViolationException.class)
+//    @ResponseBody
+//    public RestfulVO<String> constraintViolationException(ConstraintViolationException e) {
+//        log.error(e.getMessage(), e);
+//        Set<ConstraintViolation<?>> constraintViolations = e.getConstraintViolations();
+//        StringBuilder stringBuilder = new StringBuilder();
+//
+//        constraintViolations.forEach(vo -> {
+//            stringBuilder.append(vo.getMessage() + ";");
+//        });
+//
+//        return new RestfulVO<>(RestfulEnum.FAIL, stringBuilder.toString());
+//    }
+
+    /**
+     * 封装javax.validation抛出的错误
+     *
+     * @param e
+     * @return
+     */
+    @ExceptionHandler(MissingServletRequestParameterException.class)
+    @ResponseBody
+    public RestfulVO<String> missingServletRequestParameterException(MissingServletRequestParameterException e) {
+        log.error(e.getMessage(), e);
+
+        return new RestfulVO<>(RestfulEnum.FAIL, String.format("请求参数%s不存在!", e.getParameterName()));
+    }
+
+    /**
+     * 封装javax.validation抛出的错误
+     *
+     * @param e
+     * @return
+     */
+    @ExceptionHandler(HttpMessageNotReadableException.class)
+    @ResponseBody
+    public RestfulVO<String> httpMessageNotReadableException(HttpMessageNotReadableException e) {
+        log.error(e.getMessage(), e);
+
+        return new RestfulVO<>(RestfulEnum.FAIL, "请求参数错误!");
+    }
+
+    /**
+     * 将错误全部拦截封装放回 如果有其他异常需要自己处理的需要在定义错误拦截器
+     *
+     * @param e
+     * @return
+     */
+    @ExceptionHandler(Exception.class)
+    @ResponseBody
+    public RestfulVO<String> exception(Exception e) {
+        log.error(e.getMessage(), e);
+        String msg = debug ? e.getMessage() : "系统错误";
+        return new RestfulVO<>(RestfulEnum.FAIL, msg);
+    }
+}

+ 53 - 0
base-springframework/base-springframework-core/src/main/java/com/wei/base/springframework/core/web/handler/ResponseHandler.java

@@ -0,0 +1,53 @@
+package com.wei.base.springframework.core.web.handler;
+
+import com.wei.base.springframework.core.vo.RestfulVO;
+import com.wei.base.springframework.core.web.config.ResponseHandlerConfigure;
+import com.wei.base.springframework.util.RegexUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.MethodParameter;
+import org.springframework.http.MediaType;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.server.ServerHttpRequest;
+import org.springframework.http.server.ServerHttpResponse;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
+
+/**
+ * 返回值封装
+ *
+ * @author : weierming
+ * @date : 2020/7/10
+ */
+@Slf4j
+@ControllerAdvice
+public class ResponseHandler implements ResponseBodyAdvice<Object> {
+
+    @Autowired
+    private ResponseHandlerConfigure responseHandlerConfigure;
+
+    // 只对以下路径进行封装 以防封装到spring以及第三方接口导致出现问题情况
+    private static final String PACKAGE_PATH = ".*.controller.*";
+
+    @Override
+    public boolean supports(MethodParameter methodParameter, Class<? extends HttpMessageConverter<?>> aClass) {
+        // 如果没启用的话就跳过
+        if (!responseHandlerConfigure.getEnabled()) {
+            return Boolean.FALSE;
+        }
+
+        // 如果不是controller包下的不进行封装 以防封装到spring以及第三方接口导致出现问题情况
+        if (!RegexUtil.matcher(PACKAGE_PATH, methodParameter.getExecutable().getDeclaringClass().getName())) {
+            return Boolean.FALSE;
+        }
+
+        return Boolean.TRUE;
+    }
+
+    @Override
+    public Object beforeBodyWrite(Object t, MethodParameter methodParameter, MediaType mediaType,
+                                  Class<? extends HttpMessageConverter<?>> httpMessageConverter,
+                                  ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) {
+        return new RestfulVO<>(t);
+    }
+}

+ 6 - 0
base-springframework/base-springframework-core/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,6 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+	com.wei.base.springframework.core.CoreConfiguration
+#org.springframework.boot.env.EnvironmentPostProcessor=\
+#	org.springframework.core.web.config.Test
+org.springframework.boot.env.EnvironmentPostProcessor=\
+  com.wei.base.springframework.core.env.InitializeCustomConfiguration

+ 15 - 0
base-springframework/base-springframework-core/src/main/resources/common-application.yml

@@ -0,0 +1,15 @@
+#公共配置 减少各个项目中的配置
+service:
+  undertow:
+    threads:
+      # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
+      # 不要设置过大,如果过大,启动项目会报错:打开文件数过多
+      io: 16
+      # 阻塞任务线程池, 当执行类似servlet请求阻塞IO操作, undertow会从这个线程池中取得线程
+      # 它的值设置取决于系统线程执行任务的阻塞系数,默认值是IO线程数*8
+      worker: 256
+    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
+    # 每块buffer的空间大小,越小的空间被利用越充分,不要设置太大,以免影响其他应用,合适即可
+    buffer-size: 1024
+    # 是否分配的直接内存(NIO直接分配的堆外内存)
+    direct-buffers: true

+ 24 - 0
base-springframework/base-springframework-mysql/src/main/java/com/wei/base/springframework/mysql/config/MybatisPlusConfig.java

@@ -0,0 +1,24 @@
+package com.wei.base.springframework.mysql.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@EnableTransactionManagement
+@MapperScan("com.wei.**.mapper")
+@Configuration
+public class MybatisPlusConfig {
+
+    /**
+     * 设置分页能够查询总条数
+     *
+     * @return
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        PaginationInterceptor page = new PaginationInterceptor();
+        return page;
+    }
+}

+ 47 - 0
base-springframework/base-springframework-mysql/src/main/java/com/wei/base/springframework/mysql/constants/GeneratorParam.java

@@ -0,0 +1,47 @@
+package com.wei.base.springframework.mysql.constants;
+
+import lombok.Data;
+
+@Data
+public class GeneratorParam {
+
+    /**
+     * 生成文件时文件创建人
+     */
+    private String author = "wei";
+
+    /**
+     * 生成文件路径
+     */
+    private String outputDir = "/wei/test/src/main/java/";
+
+    /**
+     * 驱动连接的URL
+     */
+    private String dataSourceUrl = "jdbc:mysql://gz-cdb-mrzurxn3.sql.tencentcdb.com:60057/share?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT";
+
+    /**
+     * 数据库连接用户名
+     */
+    private String dataSourceUserName = "root";
+
+    /**
+     * 数据库连接密码
+     */
+    private String dataSourcePassWord = "Leven1234@";
+
+    /**
+     * 需要生成的表
+     */
+    private String[] include = {};
+
+    /**
+     * 排除生成的表
+     */
+    private String[] exclude = {};
+
+    /**
+     * 包名
+     */
+    private String parent = "com.wei.test";
+}

+ 54 - 0
base-springframework/base-springframework-mysql/src/main/java/com/wei/base/springframework/mysql/env/InitializeCustomConfiguration.java

@@ -0,0 +1,54 @@
+package com.wei.base.springframework.mysql.env;
+
+import com.google.common.collect.Lists;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.env.EnvironmentPostProcessor;
+import org.springframework.core.env.ConfigurableEnvironment;
+import org.springframework.core.env.PropertiesPropertySource;
+import org.springframework.core.env.PropertySource;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+/**
+ * 加载自定义配置文件
+ *
+ * @author : weierming
+ * @date : 2020/7/13
+ */
+public class InitializeCustomConfiguration implements EnvironmentPostProcessor {
+
+    //Properties对象
+    private final Properties PROPERTIES = new Properties();
+
+    //自定义配置文件地址
+    private static final List<String> PROFILES = Lists.newArrayList("mysql-application.yml");
+
+    @Override
+    public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
+        PROFILES.stream().forEach(profile -> {
+            //从classpath路径下面查找文件
+            Resource resource = new ClassPathResource(profile);
+            //加载成PropertySource对象,并添加到Environment环境中
+            environment.getPropertySources().addLast(loadProfiles(resource));
+        });
+    }
+
+    //加载单个配置文件
+    private PropertySource<?> loadProfiles(Resource resource) {
+        if (resource == null || !resource.exists()) {
+            throw new IllegalArgumentException("资源" + resource + "不存在");
+        }
+
+        try {
+            //从输入流中加载一个Properties对象
+            PROPERTIES.load(resource.getInputStream());
+            return new PropertiesPropertySource(resource.getFilename(), PROPERTIES);
+        } catch (IOException ex) {
+            throw new IllegalStateException("加载配置文件失败" + resource, ex);
+        }
+    }
+}

+ 41 - 0
base-springframework/base-springframework-mysql/src/main/resources/templates/controller.java.ftl

@@ -0,0 +1,41 @@
+package ${package.Controller};
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+<#if restControllerStyle>
+import org.springframework.web.bind.annotation.RestController;
+<#else>
+import org.springframework.stereotype.Controller;
+</#if>
+<#if superControllerClassPackage??>
+import ${superControllerClassPackage};
+</#if>
+
+/**
+ * <p>
+ * ${table.comment!} 前端控制器
+ * </p>
+ *
+ * @author ${author}
+ * @since ${date}
+ */
+<#if restControllerStyle>
+@RestController
+<#else>
+@Controller
+</#if>
+@RequestMapping("/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>")
+<#if kotlin>
+class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()</#if>
+<#else>
+<#if superControllerClass??>
+public class ${table.controllerName} extends ${superControllerClass} {
+<#else>
+public class ${table.controllerName} {
+</#if>
+
+	@Autowired
+	private ${table.serviceName} <#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>Service;
+}
+</#if>

+ 14 - 0
base-springframework/base-springframework-mysql/src/main/resources/templates/mapstruct.java.ftl

@@ -0,0 +1,14 @@
+package ${cfg.mapstructPageName};
+
+import org.mapstruct.Mapper;
+
+/**
+* ${table.comment!} 服务类型实体转换
+*
+* @author ${author}
+* @since ${date}
+*/
+@Mapper(componentModel = "spring")
+public interface ${entity}Mapstruct {
+
+}

+ 29 - 0
base-springframework/base-springframework-mysql/src/main/resources/templates/serviceImpl.java.ftl

@@ -0,0 +1,29 @@
+package ${package.ServiceImpl};
+
+import ${package.Entity}.${entity};
+import ${package.Mapper}.${table.mapperName};
+import ${package.Service}.${table.serviceName};
+import ${superServiceImplClassPackage};
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * ${table.comment!} 服务实现类
+ * </p>
+ *
+ * @author ${author}
+ * @since ${date}
+ */
+@Service
+<#if kotlin>
+open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} {
+
+}
+<#else>
+public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {
+
+	@Autowired
+	private ${table.mapperName} <#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>Mapper;
+}
+</#if>

+ 3 - 0
base-springframework/base-springframework-util/.gitignore

@@ -0,0 +1,3 @@
+/target/
+/.project
+/.classpath

+ 18 - 0
base-springframework/base-springframework-util/src/main/java/com/wei/base/springframework/util/RegexUtil.java

@@ -0,0 +1,18 @@
+package com.wei.base.springframework.util;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 正则匹配工具
+ *
+ * @author admin
+ */
+public class RegexUtil {
+
+    public static boolean matcher(String matcher, String pattern) {
+        Pattern p = Pattern.compile(matcher);
+        Matcher m = p.matcher(pattern);
+        return m.matches();
+    }
+}

+ 125 - 0
base-springframework/base-springframework-util/src/main/java/com/wei/base/springframework/util/StringUtil.java

@@ -0,0 +1,125 @@
+package com.wei.base.springframework.util;
+
+import com.google.common.collect.Lists;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.List;
+
+/**
+ * 字符串工具类
+ *
+ * @author admin
+ */
+public class StringUtil extends StringUtils {
+
+    public static final char UNDERLINE = '_';
+
+    /**
+     * 驼峰格式字符串转换为下划线格式字符串
+     *
+     * <pre>
+     * camelToUnderline("userName") = "user_name";
+     * </pre>
+     */
+    public static String camelToUnderline(String param) {
+        if (isBlank(param)) {
+            return "";
+        }
+
+        int len = param.length();
+        StringBuilder sb = new StringBuilder(len);
+        for (int i = 0; i < len; i++) {
+            char c = param.charAt(i);
+            if (Character.isUpperCase(c)) {
+                sb.append(UNDERLINE);
+                sb.append(Character.toLowerCase(c));
+            } else {
+                sb.append(c);
+            }
+        }
+
+        return sb.toString();
+    }
+
+    public static String[] camelToUnderline(String[] param) {
+        if (param == null) {
+            return null;
+        }
+
+        Integer length = param.length;
+        String[] array = new String[length];
+        for (int i = 0; i < length; i++) {
+            array[i] = camelToUnderline(param[i]);
+        }
+
+        return array;
+    }
+
+    /**
+     * 下划线格式字符串转换为驼峰格式字符串
+     *
+     * <pre>
+     * underlineToCamel("user_name") = "userName";
+     * </pre>
+     */
+    public static String underlineToCamel(String param) {
+        if (isBlank(param)) {
+            return "";
+        }
+        int len = param.length();
+        StringBuilder sb = new StringBuilder(len);
+        for (int i = 0; i < len; i++) {
+            char c = param.charAt(i);
+            if (c == UNDERLINE) {
+                if (++i < len) {
+                    sb.append(Character.toUpperCase(param.charAt(i)));
+                }
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * 下划线格式字符串转换为大驼峰格式字符串
+     *
+     * <pre>
+     * underlineToCamel("user_name") = "UserName";
+     * </pre>
+     */
+    public static String underlineToBigCamel(String param) {
+        if (isBlank(param)) {
+            return "";
+        }
+        int len = param.length();
+        StringBuilder sb = new StringBuilder(len);
+        for (int i = 0; i < len; i++) {
+            char c = param.charAt(i);
+            if (c == UNDERLINE) {
+                if (++i < len) {
+                    sb.append(Character.toUpperCase(param.charAt(i)));
+                }
+            } else {
+                if (i == 0) {
+                    c = Character.toUpperCase(c);
+                }
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+
+    public static List<String> splitList(final String str, final String separatorChars) {
+        if (isBlank(str)) {
+            return Lists.newArrayList();
+        }
+
+        String[] split = split(str, separatorChars);
+        return Lists.newArrayList(split);
+    }
+
+    public static List<String> splitList(String str) {
+        return splitList(str, ",");
+    }
+}

+ 5 - 0
base-springframework/base-springframework-util/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,5 @@
+#org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+#	com.wei.base.springframework.util.UtilConfiguration
+	
+#org.springframework.boot.env.EnvironmentPostProcessor=\
+#	org.springframework.core.web.config.Test

+ 87 - 0
pom.xml

@@ -0,0 +1,87 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.wei</groupId>
+    <artifactId>base-framework</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>基础框架</name>
+
+    <modules>
+        <module>base-springframework-starter</module>
+        <module>base-springframework</module>
+    </modules>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
+        <java.version>1.8</java.version>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
+        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+    </properties>
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <version>${maven-deploy-plugin.version}</version>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>${maven-compiler-plugin.version}</version>
+                <configuration>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories><!-- 代码库 -->
+        <repository>
+            <id>maven-ali</id>
+            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+                <updatePolicy>always</updatePolicy>
+                <checksumPolicy>fail</checksumPolicy>
+            </snapshots>
+        </repository>
+    </repositories>
+
+    <!--	<repositories>
+            <repository>
+                <id></id>
+                <url></url>
+            </repository>
+        </repositories>
+        <pluginRepositories>
+            <pluginRepository>
+                <id></id>
+                <url></url>
+            </pluginRepository>
+        </pluginRepositories>
+        <distributionManagement>
+            <repository>
+                <id></id>
+                <url></url>
+            </repository>
+            <snapshotRepository>
+                <id></id>
+                <url></url>
+            </snapshotRepository>
+        </distributionManagement>-->
+</project>

+ 33 - 0
wei-test/src/main/java/com/wei/test/vo/UserVO.java

@@ -0,0 +1,33 @@
+package com.wei.test.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 统一返回值
+ *
+ * @author : weierming
+ * @date : 2020/7/10
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class UserVO implements Serializable {
+
+    private static final long serialVersionUID = 6488177830405564354L;
+
+    private Long userId;
+
+    private String userName;
+
+    private Date date;
+
+    private List<UserVO> list;
+
+    private UserVO userVO;
+}

+ 0 - 0
wei-test/src/main/resources/application.yml