人脸识别
This commit is contained in:
parent
9f2ad514c7
commit
bb3600c101
|
@ -150,7 +150,7 @@ public class SysLoginController {
|
||||||
cn.hutool.json.JSONObject matchesJSONObject = face_matches.getJSONObject(i);
|
cn.hutool.json.JSONObject matchesJSONObject = face_matches.getJSONObject(i);
|
||||||
Double similarity = matchesJSONObject.getDouble("similarity");
|
Double similarity = matchesJSONObject.getDouble("similarity");
|
||||||
System.out.println("人脸相似度:" + similarity);
|
System.out.println("人脸相似度:" + similarity);
|
||||||
if (similarity >= 0.995){
|
if (similarity >= 0.98){
|
||||||
System.out.println("人脸识别通过");
|
System.out.println("人脸识别通过");
|
||||||
String substring = imageFile.substring(imageFile.lastIndexOf("/") + 1, imageFile.lastIndexOf("."));
|
String substring = imageFile.substring(imageFile.lastIndexOf("/") + 1, imageFile.lastIndexOf("."));
|
||||||
System.out.println("识别用户为" + substring);
|
System.out.println("识别用户为" + substring);
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
||||||
// 过滤请求
|
// 过滤请求
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||||
.antMatchers("/login", "/register", "/captchaImage","/loginApp","/loginAppBySms","/base/sendMes").permitAll()
|
.antMatchers("/login", "/register", "/captchaImage","/loginApp","/loginAppBySms","/loginByFace","/base/sendMes").permitAll()
|
||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||||
|
|
Loading…
Reference in New Issue