Skip to content

Commit

Permalink
🐛 修复当未依赖validation-api具体实现时报错的问题 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
zidoshare authored Mar 25, 2021
1 parent 1e57da7 commit 84f5565
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.security.web.util.matcher.RequestMatcher;
import org.springframework.util.Assert;
import site.zido.coffee.core.validations.PhoneValidator;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
Expand All @@ -25,7 +24,6 @@
public class PhoneAuthenticationFilter extends AbstractAuthenticationProcessingFilter {

private RequestMatcher codeRequestMatcher = new AntPathRequestMatcher("/users/sms/code", "POST");
private PhoneValidator phoneValidator = new PhoneValidator();
private PhoneCodeService phoneCodeService;
private CodeGenerator codeGenerator = new CustomCodeGenerator(CustomCodeGenerator.Mode.NUMBER);
private PhoneCodeCache cache;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@
import site.zido.coffee.mvc.exceptions.CommonBusinessException;

import javax.servlet.http.HttpServletResponse;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import javax.validation.Path;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

/**
* 统一异常处理
Expand Down
5 changes: 5 additions & 0 deletions examples/Production/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.1.Final</version>
</dependency>
<dependency>
<groupId>ai.grakn</groupId>
<artifactId>redis-mock</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions examples/default-use/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.1.Final</version>
</dependency>
</dependencies>

</project>

0 comments on commit 84f5565

Please sign in to comment.