@Valid 失效
加入以下依赖
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.5.Final</version>
</dependency>
解析jwt
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.10.2</version>
</dependency>
//通过token获取 用户名字
String token = request.getHeader("Authorization");
//签名
Algorithm algorithm = Algorithm.HMAC256("SigningKey");
JWTVerifier verifier = JWT.require(algorithm).build();
DecodedJWT jwt = verifier.verify(token);
String username = jwt.getClaim("user_name").asString();
无法建立SSL连接
1、执行该命令
yum -y install openssl openssl-devel gcc make perl
windows下打jar包,读取nacos 配置文件 异常
org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
如下设置 utf-8 编码格式启动
java -Dfile.encoding=utf-8 -jar jar包名称