Commit f4e18205 by 袁伟铭

1.0.0

parent 4b7da5ae
......@@ -14,7 +14,7 @@
<dependencies>
<dependency>
<groupId>com.zq</groupId>
<artifactId>common-utils</artifactId>
<artifactId>xxx-common-utils</artifactId>
<version>1.0.0</version>
</dependency>
......
......@@ -14,7 +14,7 @@
<dependencies>
<dependency>
<groupId>com.zq</groupId>
<artifactId>common-utils</artifactId>
<artifactId>xxx-common-utils</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
......
......@@ -22,7 +22,7 @@
<dependencies>
<dependency>
<groupId>com.zq</groupId>
<artifactId>common-utils</artifactId>
<artifactId>xxx-common-utils</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
......
......@@ -98,7 +98,10 @@ public class TokenFilter extends GenericFilterBean {
*/
private String resolveToken(HttpServletRequest request) {
String bearerToken = request.getHeader(properties.getHeader());
if (StringUtils.hasText(bearerToken) && bearerToken.startsWith(properties.getTokenStartWith())) {
if (StringUtils.hasText(bearerToken)) {
return null;
}
if (bearerToken.startsWith(properties.getTokenStartWith())) {
// 去掉令牌前缀
return bearerToken.replace(properties.getTokenStartWith(), "");
} else {
......
......@@ -3,8 +3,8 @@
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">
<parent>
<artifactId>cloud-backend</artifactId>
<groupId>com.zq</groupId>
<artifactId>cloud-backend</artifactId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -98,7 +98,10 @@ public class TokenFilter extends GenericFilterBean {
*/
private String resolveToken(HttpServletRequest request) {
String bearerToken = request.getHeader(properties.getHeader());
if (StringUtils.hasText(bearerToken) && bearerToken.startsWith(properties.getTokenStartWith())) {
if (StringUtils.hasText(bearerToken)) {
return null;
}
if (bearerToken.startsWith(properties.getTokenStartWith())) {
// 去掉令牌前缀
return bearerToken.replace(properties.getTokenStartWith(), "");
} else {
......
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