mirror of
https://gitee.com/incloudcode/yexuejc-springboot.git
synced 2025-07-13 15:32:43 +08:00
1.0.11
This commit is contained in:
parent
9ce8d4f216
commit
accd4bbbd1
@ -1,6 +1,13 @@
|
|||||||
uselaw-base 更新内容
|
uselaw-base 更新内容
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
#### version :1.0.11
|
||||||
|
**time:2018-6-19 22:18:03** <br/>
|
||||||
|
**branch:** master <br/>
|
||||||
|
**update:** <br/>
|
||||||
|
1. 更新springboot-base:1.1.5依赖
|
||||||
|
#
|
||||||
|
|
||||||
#### version :1.0.10
|
#### version :1.0.10
|
||||||
**time:2018年6月14日22:31:18** <br/>
|
**time:2018年6月14日22:31:18** <br/>
|
||||||
**branch:** master <br/>
|
**branch:** master <br/>
|
||||||
|
4
pom.xml
4
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.yexuejc.springboot</groupId>
|
<groupId>com.yexuejc.springboot</groupId>
|
||||||
<artifactId>yexuejc-springboot-parent</artifactId>
|
<artifactId>yexuejc-springboot-parent</artifactId>
|
||||||
<version>1.0.10</version>
|
<version>1.0.11</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>${project.artifactId}</name>
|
<name>${project.artifactId}</name>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<mybatis-spring-boot-starter.version>1.2.0</mybatis-spring-boot-starter.version>
|
<mybatis-spring-boot-starter.version>1.2.0</mybatis-spring-boot-starter.version>
|
||||||
<mybatis.version>3.4.2</mybatis.version>
|
<mybatis.version>3.4.2</mybatis.version>
|
||||||
|
|
||||||
<yexuejc.base.version>1.1.4</yexuejc.base.version>
|
<yexuejc.base.version>1.1.5</yexuejc.base.version>
|
||||||
<jjwt.version>0.7.0</jjwt.version>
|
<jjwt.version>0.7.0</jjwt.version>
|
||||||
<fastjson.version>1.1.46</fastjson.version>
|
<fastjson.version>1.1.46</fastjson.version>
|
||||||
<commons-codec.version>1.10</commons-codec.version>
|
<commons-codec.version>1.10</commons-codec.version>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.yexuejc.springboot</groupId>
|
<groupId>com.yexuejc.springboot</groupId>
|
||||||
<artifactId>yexuejc-springboot-parent</artifactId>
|
<artifactId>yexuejc-springboot-parent</artifactId>
|
||||||
<version>1.0.10</version>
|
<version>1.0.11</version>
|
||||||
<!-- 本地打包:使用相对关联路径 -->
|
<!-- 本地打包:使用相对关联路径 -->
|
||||||
<!--<relativePath>../../yexuejc</relativePath>-->
|
<!--<relativePath>../../yexuejc</relativePath>-->
|
||||||
</parent>
|
</parent>
|
||||||
|
@ -28,6 +28,7 @@ import org.springframework.http.converter.HttpMessageConverter;
|
|||||||
import org.springframework.http.converter.StringHttpMessageConverter;
|
import org.springframework.http.converter.StringHttpMessageConverter;
|
||||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
|
import org.springframework.web.HttpRequestMethodNotSupportedException;
|
||||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
@ -166,8 +167,11 @@ public class WebAutoConfiguration extends WebMvcConfigurerAdapter {
|
|||||||
LogUtil.exceptionLogger.error("", e);
|
LogUtil.exceptionLogger.error("", e);
|
||||||
if (e instanceof GatewayException) {
|
if (e instanceof GatewayException) {
|
||||||
return Resps.error(StrUtil.setStr(e.getMessage(), ERROR_MSG));
|
return Resps.error(StrUtil.setStr(e.getMessage(), ERROR_MSG));
|
||||||
|
} else if (e instanceof HttpRequestMethodNotSupportedException) {
|
||||||
|
return Resps.error("请求方式错误");
|
||||||
}
|
}
|
||||||
return Resps.error(ERROR_MSG);
|
return Resps.error(ERROR_MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ public class ApplicationTest {
|
|||||||
// System.out.println(publicEncryptResult);
|
// System.out.println(publicEncryptResult);
|
||||||
// System.out.println(StrUtil.toMD5(dataStr));
|
// System.out.println(StrUtil.toMD5(dataStr));
|
||||||
|
|
||||||
String publicEncryptResult="MxyCtlTnkvh+0vOPsDDL1+hO9NZ+pDps+uVt8NwJvn4SZoYfjuj2a1WYZrvDk/sUC41zRQAE85/c\ndm9IC0BtFr7CtHSnbJfExSBwHtkG3/pE4hd5ysrdQiaFmlvENJ24cVYX+4WBEZ6bfh9jB3e1QXQi\n05o+uwxOX1UW6VENEx0\u003d\n";
|
String publicEncryptResult="KHAtNzGkT/Mn7d/Ei6aoZ8KCA04mYJi5b/sxt/Jgzq76jNi0O/EMACDsipgQuwZTJrrys5xOPyy4\n1Gf8LMEldZE3GeY3i92A5jnH7IeWnLojYhNaKdIuLuf4l5uJmFgpzxhoxqSkp2JJ5Vbt8j5Hy4ov\n7tfxPDBwnT6FSfDqGLU\u003d\n";
|
||||||
|
|
||||||
//服务器私钥解密
|
//服务器私钥解密
|
||||||
String privateDecryptResult = RSA.privateDecrypt(publicEncryptResult, RSA2.getPrivateKey(privateKey, privateAlias, privatePwd));
|
String privateDecryptResult = RSA.privateDecrypt(publicEncryptResult, RSA2.getPrivateKey(privateKey, privateAlias, privatePwd));
|
||||||
|
@ -6,6 +6,7 @@ import com.yexuejc.base.util.JsonUtil;
|
|||||||
import com.yexuejc.base.util.StrUtil;
|
import com.yexuejc.base.util.StrUtil;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -72,6 +73,12 @@ public class IndexCtrl {
|
|||||||
return Resps.success("请求成功").setSucc(05652.154);
|
return Resps.success("请求成功").setSucc(05652.154);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = {"/logina"},method = RequestMethod.POST)
|
||||||
|
public Resps l2(@RequestBody UserLoginVo loginVo) {
|
||||||
|
System.out.println("请求参数:" + JsonUtil.obj2Json(loginVo));
|
||||||
|
return Resps.success("请求成功").setSucc(05652.154);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = {"/3"})
|
@RequestMapping(value = {"/3"})
|
||||||
public Resps b(@RequestBody TaVO pagerVO) {
|
public Resps b(@RequestBody TaVO pagerVO) {
|
||||||
System.out.println("请求参数:" + JsonUtil.obj2Json(pagerVO));
|
System.out.println("请求参数:" + JsonUtil.obj2Json(pagerVO));
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.yexuejc.springboot.base.web;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: maxf
|
||||||
|
* @date: 2018/6/15 22:09
|
||||||
|
*/
|
||||||
|
public class UserLoginVo implements Serializable {
|
||||||
|
private String phoneNumber;
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
public String getPhoneNumber() {
|
||||||
|
return phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhoneNumber(String phoneNumber) {
|
||||||
|
this.phoneNumber = phoneNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||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QUb86SydPXdx8FO9FAlnXShVr3J6Yw
|
|
||||||
DQYJKoZIhvcNAQELBQADgYEAZC0dpZ1x2xmoR5Sq0V3yqZ0NySZ7n49FmDr1GUy1
|
|
||||||
WiyK4XwuOQJitu4gv/7NWwvNXqPwbjbKqLnQvYr+PO2duvnU6xMzB66C108fBPh1
|
|
||||||
LU8gzMl7avm1pDKODVXN5Ovl0I7gx8N5XvjazjfXYchEPrvh91WkXqLkNxwd6cK3
|
|
||||||
hag=
|
|
||||||
-----END CERTIFICATE-----
|
|
Binary file not shown.
Binary file not shown.
BIN
yexuejc-springboot-base/src/test/resources/testPub.key
Normal file
BIN
yexuejc-springboot-base/src/test/resources/testPub.key
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user