From a3b0e2a0e6ba857d77474bb07d75da31040fdd57 Mon Sep 17 00:00:00 2001 From: LuoYe_MyWork Date: Fri, 8 May 2020 17:27:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=BB=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/qyi/e5/config/security/SecurityConfig.java | 8 -------- .../qyi/e5/outlook/service/impl/OutlookServiceImpl.java | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/io/qyi/e5/config/security/SecurityConfig.java b/src/main/java/io/qyi/e5/config/security/SecurityConfig.java index d322843..592bba4 100644 --- a/src/main/java/io/qyi/e5/config/security/SecurityConfig.java +++ b/src/main/java/io/qyi/e5/config/security/SecurityConfig.java @@ -50,20 +50,12 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { .apply(usernamePasswordAuthenticationConfig); /*关闭创建session*/ http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); - /*formLogin() - .loginPage("/user/login")// 登陆页面 - .loginProcessingUrl("/user/loginFrom")// 登陆表单提交请求 - .and()*/ http.authorizeRequests().antMatchers("/user/login", "/user/loginFrom", "/auth2/getGithubUrl").permitAll()// 指定相应的请求 不需要验证 // .and() // .authorizeRequests().antMatchers("/quartz/**").permitAll()//测试 .anyRequest()// 任何请求 .authenticated();// 都需要身份认证 -// http.exceptionHandling().accessDeniedHandler(); -// http.formLogin().loginProcessingUrl("api/getInfo"); -// http.formLogin().usernameParameter("username"); -// http.formLogin().passwordParameter("password"); } diff --git a/src/main/java/io/qyi/e5/outlook/service/impl/OutlookServiceImpl.java b/src/main/java/io/qyi/e5/outlook/service/impl/OutlookServiceImpl.java index c17658a..a698dc4 100644 --- a/src/main/java/io/qyi/e5/outlook/service/impl/OutlookServiceImpl.java +++ b/src/main/java/io/qyi/e5/outlook/service/impl/OutlookServiceImpl.java @@ -206,6 +206,9 @@ public class OutlookServiceImpl extends ServiceImpl impl count = jsonObject.get("value").getAsJsonArray().size(); } JsonArray value = jsonObject.get("value").getAsJsonArray(); + if (count == 0) { + count = value.size(); + } for (int i = 0; i < count - 1; i++) { JsonObject mail = value.get(i).getAsJsonObject(); String id = mail.get("id").getAsString();