diff --git a/len-activiti/src/main/java/com/len/util/Base64Utils.java b/len-activiti/src/main/java/com/len/util/Base64Utils.java
index b273227187529c7c0a307e046cfc7d05f4b33780..318a0c1cf94aced364ab357fa3796bc982dac2bc 100644
--- a/len-activiti/src/main/java/com/len/util/Base64Utils.java
+++ b/len-activiti/src/main/java/com/len/util/Base64Utils.java
@@ -4,7 +4,6 @@ import java.io.IOException;
import java.io.InputStream;
import org.apache.log4j.Logger;
-
import sun.misc.BASE64Encoder;
/**
@@ -20,7 +19,8 @@ public class Base64Utils {
byte[] bytes = new byte[in.available()];
// 将文件中的内容读入到数组中
in.read(bytes);
- strBase64 = encoder.encode(bytes); // 将字节流数组转换为字符串
+ // 将字节流数组转换为字符串
+ strBase64 = encoder.encode(bytes);
in.close();
} catch (IOException ioe) {
logger.error("图片转64编码异常", ioe);
diff --git a/len-conmon/pom.xml b/len-common/pom.xml
similarity index 86%
rename from len-conmon/pom.xml
rename to len-common/pom.xml
index 39d23376e81f04bc13634b2313215b07e34e1bb4..b10d3396d1bdec2276295cf3dae13a324ade62a4 100644
--- a/len-conmon/pom.xml
+++ b/len-common/pom.xml
@@ -7,12 +7,12 @@
lenosp-2.0-SNAPSHOT
- len-conmon
+ len-common
jar
- len-conmon Maven Webapp
+ len-common
- http://www.example.com
+ https://gitee.com/zzdevelop/lenosp
UTF-8
@@ -30,6 +30,6 @@
- len-conmon
+ len-common
diff --git a/len-conmon/src/main/java/com/len/handler/BusinessException.java b/len-conmon/src/main/java/com/len/handler/BusinessException.java
deleted file mode 100644
index 8d2687611e310fd02990a1a8f838529a5a6e144d..0000000000000000000000000000000000000000
--- a/len-conmon/src/main/java/com/len/handler/BusinessException.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.len.handler;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-public class BusinessException extends RuntimeException {
- private Integer code;
- private String errMsg;
-}
diff --git a/len-conmon/src/main/java/com/len/handler/GlobalExceptionHandler.java b/len-conmon/src/main/java/com/len/handler/GlobalExceptionHandler.java
deleted file mode 100644
index 265c6894ccf5316cec69ad60a215a71d518fdf74..0000000000000000000000000000000000000000
--- a/len-conmon/src/main/java/com/len/handler/GlobalExceptionHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.len.handler;
-
-
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.len.response.Result;
-import com.len.response.ResultCode;
-
-@ControllerAdvice
-public class GlobalExceptionHandler {
- /**
- * 全局异常处理,没有指定异常的类型,不管什么异常都是可以捕获的
- * @param e
- * @return
- */
- @ExceptionHandler(Exception.class)
- @ResponseBody
- public Result error(Exception e){
- //e.printStackTrace();
- System.err.println(e.getMessage());
- return Result.error();
- }
-
- /**
- * 处理特定异常类型,可以定义多个,这里只以ArithmeticException为例
- * @param e
- * @return
- */
- @ExceptionHandler(ArithmeticException.class)
- @ResponseBody
- public Result error(ArithmeticException e){
- //e.printStackTrace();
- System.err.println(e.getMessage());
- return Result.error().code(ResultCode.ARITHMETIC_EXCEPTION.getCode())
- .message(ResultCode.ARITHMETIC_EXCEPTION.getMessage());
- }
-
- /**
- * 处理业务异常,我们自己定义的异常
- * @param e
- * @return
- */
- @ExceptionHandler(BusinessException.class)
- @ResponseBody
- public Result error(BusinessException e){
- //e.printStackTrace();
- System.err.println(e.getErrMsg());
- return Result.error().code(e.getCode())
- .message(e.getErrMsg());
- }
-
-}
diff --git a/len-conmon/src/main/java/com/len/response/Result.java b/len-conmon/src/main/java/com/len/response/Result.java
deleted file mode 100644
index 7728ef223706d26628a756970a01e28e69e26489..0000000000000000000000000000000000000000
--- a/len-conmon/src/main/java/com/len/response/Result.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.len.response;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import lombok.Data;
-
-@Data
-public class Result {
-
- private Boolean success;
-
- private Integer code;
-
- private String message;
-
- private T data;
-
- /**
- * 构造方法私有化,里面的方法都是静态方法
- * 达到保护属性的作用
- */
- private Result(){
-
- }
-
- /**
- * 这里是使用链式编程
- */
- public static Result ok(){
- Result result = new Result();
- result.setSuccess(true);
- result.setCode(ResultCode.SUCCESS.getCode());
- result.setMessage(ResultCode.SUCCESS.getMessage());
- return result;
- }
-
- /**
- * 自定义返回成功与否
- * @param success
- * @return
- */
- public Result success(Boolean success){
- this.setSuccess(success);
- return this;
- }
-
- public Result message(String message){
- this.setMessage(message);
- return this;
- }
-
- public Result code(Integer code){
- this.setCode(code);
- return this;
- }
-
- public static Result success(T data){
- Result result = new Result();
- result.setSuccess(true);
- result.setCode(ResultCode.SUCCESS.getCode());
- result.setMessage(ResultCode.SUCCESS.getMessage());
- result.setData(data);
- return result;
- }
-
- public static Result error(){
- Result result = new Result();
- result.setSuccess(false);
- result.setCode(ResultCode.COMMON_FAIL.getCode());
- result.setMessage(ResultCode.COMMON_FAIL.getMessage());
- return result;
- }
-
-
-
-// public Result data(String key,Object value){
-// this.data.put(key,value);
-// return this;
-// }
-//
-// public Result data(Map map){
-// this.setData(map);
-// return this;
-// }
-}
diff --git a/len-conmon/src/main/java/com/len/response/ResultCode.java b/len-conmon/src/main/java/com/len/response/ResultCode.java
deleted file mode 100644
index ea39deab4ca067fe40588960f016911d9abe5939..0000000000000000000000000000000000000000
--- a/len-conmon/src/main/java/com/len/response/ResultCode.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package com.len.response;
-
-public enum ResultCode {
- /* 成功 */
- SUCCESS(200, "成功"),
-
- /* 默认失败 */
- COMMON_FAIL(999, "失败"),
-
- /* 参数错误:1000~1999 */
- /**
- * 参数无效
- */
- PARAM_NOT_VALID(1001, "参数无效"),
- /**
- * 参数为空
- */
- PARAM_IS_BLANK(1002, "参数为空"),
- /**
- * 参数类型错误
- */
- PARAM_TYPE_ERROR(1003, "参数类型错误"),
- /**
- * 参数缺失
- */
- PARAM_NOT_COMPLETE(1004, "参数缺失"),
-
- /* 用户错误 */
- /**
- * 用户未登录
- */
- USER_NOT_LOGIN(2001, "用户未登录"),
- /**
- * 账号已过期
- */
- USER_ACCOUNT_EXPIRED(2002, "账号已过期"),
- /**
- * 密码错误
- */
- USER_CREDENTIALS_ERROR(2003, "密码错误"),
- /**
- * 密码过期
- */
- USER_CREDENTIALS_EXPIRED(2004, "密码过期"),
- /**
- * 账号不可用
- */
- USER_ACCOUNT_DISABLE(2005, "账号不可用"),
- /**
- * 账号被锁定
- */
- USER_ACCOUNT_LOCKED(2006, "账号被锁定"),
- /**
- * 账号不存在
- */
- USER_ACCOUNT_NOT_EXIST(2007, "账号不存在"),
- /**
- * 账号已存在
- */
- USER_ACCOUNT_ALREADY_EXIST(2008, "账号已存在"),
- /**
- * 账号下线
- */
- USER_ACCOUNT_USE_BY_OTHERS(2009, "账号下线"),
-
- /*部门错误*/
- /**
- * 部门不存在
- */
- DEPARTMENT_NOT_EXIST(3007, "部门不存在"),
- /**
- * 部门已存在
- */
- DEPARTMENT_ALREADY_EXIST(3008, "部门已存在"),
-
- /* 业务错误 */
- /**
- * 没有权限
- */
- NO_PERMISSION(3001, "没有权限"),
-
- /*运行时异常*/
- /**
- * 算数异常
- */
- ARITHMETIC_EXCEPTION(9001,"算数异常"),
- /**
- * 查询无果
- */
- NO_SEARCH(4001,"查询无果");
-
- private Integer code;
-
- private String message;
-
- ResultCode(Integer code,String message){
- this.code = code;
- this.message = message;
- }
-
- public Integer getCode() {
- return code;
- }
-
- public String getMessage() {
- return message;
- }
-
-}
diff --git a/len-conmon/src/main/java/com/len/util/DataUtil.java b/len-conmon/src/main/java/com/len/util/DataUtil.java
deleted file mode 100644
index c4fb8f9bcfc337e7d60a74201e47d33cff655953..0000000000000000000000000000000000000000
--- a/len-conmon/src/main/java/com/len/util/DataUtil.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.len.util;
-
-public class DataUtil {
-
-}
diff --git a/len-web/src/main/java/com/len/LenApplication.java b/len-web/src/main/java/com/len/LenApplication.java
index 5601bb7e6d1e960c2dc40e69eba9e2908dc6ce6f..c21eb2c11a94c572c9c5c34477e4c3cb41e0c3ee 100644
--- a/len-web/src/main/java/com/len/LenApplication.java
+++ b/len-web/src/main/java/com/len/LenApplication.java
@@ -16,7 +16,6 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@EnableTransactionManagement
@ComponentScan({"com.len", "org.activiti"})
@MapperScan(basePackages = {"com.len.mapper"})
-
@SpringBootApplication(exclude = {RedisAutoConfiguration.class,
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration.class})
@@ -24,7 +23,7 @@ public class LenApplication {
public static void main(String[] args) {
SpringApplication.run(LenApplication.class, args);
- System.out.println("Server start succ");
+ System.out.println("Server start success!");
// 没啥意思,我就是想加个注释
}
diff --git a/pom.xml b/pom.xml
index c53077477ce36c857195be365141acf9a09c025f..2fef7af9ac1d9c192f9c95a7eba84012de8ca410 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,9 +14,42 @@
2.1.12.RELEASE
+
UTF-8
1.8
+ lenosp-2.0-SNAPSHOT
+
+ 3.5.3
+ 3.2.0
+ 5.1.6
+ 1.2.8
+ 1.2.5
+ 2.5.0
+ 2.3.0
+ 2.1.9.RELEASE
+
+ 1.3.2
+ 1.5.2
+ 3.2.3
+ 1.3.2
+ 1.5.2
+ 1.5.2
+ 1.5.2
+ 0.1
+
+ 2.5
+ 3.7
+ 1.3.2
+
+ 4.0.12
+ 1.16.10
+ 2.7.0
+ 3.4.0
+ 1.2.41
+ 1.7.25
+ 2.0.1.Final
+ 6.0.10.Final
@@ -32,11 +65,74 @@
len-web
len-activiti
len-blog
- len-conmon
+ len-common
-
+
+
+
+ com.len
+ len-core
+ ${lenosp.version}
+
+
+
+ com.len
+ len-web
+ ${lenosp.version}
+
+
+ com.len
+ len-sys
+ ${lenosp.version}
+
+
+ com.len
+ len-activiti
+ ${lenosp.version}
+
+
+ com.len
+ len-blog
+ ${lenosp.version}
+
+
+
+
+
+ lenosp
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ ${java.version}
+ ${java.version}
+
+
+
+
+ org.mybatis.generator
+ mybatis-generator-maven-plugin
+ 1.3.6
+
+ len-web/src/main/resources/auto-config/mybatis-config.xml
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.0.0
+
+
+
+
org.springframework.boot
@@ -44,44 +140,17 @@
true
-
- org.springframework.boot
- spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
-
- junit
- junit
- 4.12
-
-
-
com.baomidou
mybatis-plus-boot-starter
- 3.2.0
-
-
-
-
org.springframework.boot
spring-boot-starter-cache
@@ -107,10 +176,6 @@
org.springframework.boot
spring-boot-starter-data-redis
-
- org.springframework.boot
- spring-boot-starter-actuator
-
org.springframework.boot
@@ -126,7 +191,7 @@
mysql
mysql-connector-java
- 5.1.6
+ ${mysql-connector.version}
@@ -137,31 +202,17 @@
compile
-->
-
+
com.alibaba
druid-spring-boot-starter
- 1.2.6
+ ${druid.version}
-
-
com.github.pagehelper
pagehelper-spring-boot-starter
- 1.2.5
+ ${pagehelper.version}
org.mybatis
@@ -173,53 +224,36 @@
-
-
-
org.mybatis
mybatis
- 3.5.3
+ ${mybatis.version}
-
- ehcache-core
net.sf.ehcache
- 2.5.0
+ ehcache-core
+ ${ehcache-core.version}
+
org.apache.shiro
shiro-ehcache
- 1.5.2
+ ${shiro-ehcache.version}
+
+
+ ehcache-core
+ net.sf.ehcache
+
+
org.apache.shiro
shiro-aspectj
- 1.5.2
+ ${shiro-aspectj.version}
@@ -227,65 +261,83 @@
org.slf4j
slf4j-api
- 1.7.25
+ ${slf4j-api.version}
org.apache.shiro
shiro-core
- 1.5.2
+ ${shiro-core.version}
org.projectlombok
lombok
- 1.16.10
+ ${lombok.version}
provided
org.apache.shiro
shiro-web
- 1.3.2
+ ${shiro-web.version}
+
+
+ shiro-core
+ org.apache.shiro
+
+
org.apache.shiro
shiro-spring
- 1.5.2
+ ${shiro-spring.version}
+
+
+ shiro-web
+ org.apache.shiro
+
+
net.mingsoft
shiro-freemarker-tags
- 0.1
+ ${shiro-freemarker-tags.version}
org.apache.commons
commons-lang3
- 3.7
+ ${commons-lang3.version}
commons-io
commons-io
- 2.5
+ ${commons-io.version}
commons-fileupload
commons-fileupload
- 1.3.2
+ ${commons-fileupload.version}
+
+
+ commons-io
+ commons-io
+
+
com.alibaba
fastjson
- 1.2.41
+ ${fastjson.version}
@@ -309,7 +361,7 @@
io.springfox
springfox-swagger2
- 2.7.0
+ ${swagger.version}
@@ -317,7 +369,7 @@
io.springfox
springfox-swagger-ui
- 2.7.0
+ ${swagger.version}
@@ -329,131 +381,76 @@
org.quartz-scheduler
quartz
- 2.3.0
+ ${quartz-custom.version}
cn.hutool
hutool-core
- 4.0.12
+ ${hutool.version}
cn.hutool
hutool-http
- 4.0.12
+ ${hutool.version}
org.hibernate.validator
hibernate-validator
- 6.0.10.Final
+ ${hibernate-validator.version}
javax.validation
validation-api
- 2.0.1.Final
+ ${validation-api.version}
com.auth0
java-jwt
- 3.4.0
+ ${java-jwt.version}
org.apache.shiro
shiro-quartz
- 1.3.2
+ ${shiro-quartz.version}
org.opensymphony.quartz
quartz
+
+ shiro-core
+ org.apache.shiro
+
org.springframework.session
spring-session-data-redis
- 2.1.9.RELEASE
+ ${spring-data-redis.version}
org.crazycake
shiro-redis
- 3.2.3
+ ${shiro-redis.version}
+
+
+ shiro-core
+ org.apache.shiro
+
+
- org.springframework.boot
- spring-boot-devtools
+ org.springframework.boot
+ spring-boot-devtools
-
-
-
-
- com.len
- len-core
- lenosp-2.0-SNAPSHOT
-
-
-
- com.len
- len-web
- lenosp-2.0-SNAPSHOT
-
-
- com.len
- len-sys
- lenosp-2.0-SNAPSHOT
-
-
- com.len
- len-activiti
- lenosp-2.0-SNAPSHOT
-
-
- com.len
- len-blog
- lenosp-2.0-SNAPSHOT
-
-
-
-
-
- lenosp
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- ${java.version}
- ${java.version}
-
-
-
-
- org.mybatis.generator
- mybatis-generator-maven-plugin
- 1.3.6
-
- len-web/src/main/resources/auto-config/mybatis-config.xml
-
- true
- true
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 3.0.0
-
-
-
-
\ No newline at end of file