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();