修复token过期

This commit is contained in:
liuchengqian 2023-03-16 21:38:43 +08:00
parent 8fac34f648
commit a6d9c2f282
2 changed files with 5 additions and 10 deletions

View File

@ -31,15 +31,12 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.authorizeRequests() .authorizeRequests()
// 所有OPTIONS请求都放行 // 所有OPTIONS请求都放行
.antMatchers(HttpMethod.OPTIONS).permitAll() .antMatchers(HttpMethod.OPTIONS).permitAll()
.antMatchers("/push/**").permitAll()
.antMatchers("/queryFirePoint").permitAll()
.antMatchers("/insertFirePoint").permitAll() .antMatchers("/insertFirePoint").permitAll()
.antMatchers("/insertFirePointChannelPrecise").permitAll() .antMatchers("/insertFirePointChannelPrecise").permitAll()
.antMatchers("/queryFirePointBroadcast").permitAll() .antMatchers("/queryFirePointBroadcast").permitAll()
.antMatchers("/autoSync").permitAll() .antMatchers("/autoSync").permitAll()
.antMatchers("/debug").permitAll() .antMatchers("/debug").permitAll()
.antMatchers("/queryNotice").permitAll()//查询通知 .antMatchers("/queryNotice").permitAll()//查询通知
.antMatchers(HttpMethod.POST, "/api/user/updateSysUser").permitAll()
.antMatchers(HttpMethod.POST, "/api/user/add").permitAll()//新增用户 .antMatchers(HttpMethod.POST, "/api/user/add").permitAll()//新增用户
.antMatchers(HttpMethod.POST, "/api/user/add2").permitAll()//新增用户直接注册 .antMatchers(HttpMethod.POST, "/api/user/add2").permitAll()//新增用户直接注册
.antMatchers(HttpMethod.POST, "/api/user/check/duplicate").permitAll() .antMatchers(HttpMethod.POST, "/api/user/check/duplicate").permitAll()
@ -48,7 +45,6 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers(HttpMethod.GET, "/selectCityName").permitAll() .antMatchers(HttpMethod.GET, "/selectCityName").permitAll()
.antMatchers(HttpMethod.GET, "/weather/cityName").permitAll() .antMatchers(HttpMethod.GET, "/weather/cityName").permitAll()
.antMatchers(HttpMethod.GET, "/weather/cityId").permitAll() .antMatchers(HttpMethod.GET, "/weather/cityId").permitAll()
.antMatchers(HttpMethod.GET, "/selectFirePointByCode").permitAll()
.antMatchers(HttpMethod.GET, "/api/user/verificationCode").permitAll() .antMatchers(HttpMethod.GET, "/api/user/verificationCode").permitAll()
.antMatchers(HttpMethod.GET, "/api/user/verificationCodeUpdate").permitAll() .antMatchers(HttpMethod.GET, "/api/user/verificationCodeUpdate").permitAll()
.antMatchers(HttpMethod.GET, "/api/user/getVerificationCode").permitAll() .antMatchers(HttpMethod.GET, "/api/user/getVerificationCode").permitAll()
@ -61,7 +57,6 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers(HttpMethod.GET, "/api/adm/getCityList").permitAll()//根据省编号获取市列表 .antMatchers(HttpMethod.GET, "/api/adm/getCityList").permitAll()//根据省编号获取市列表
.antMatchers(HttpMethod.GET, "/api/adm/getCountyList").permitAll()//根据市编号获取区县列表 .antMatchers(HttpMethod.GET, "/api/adm/getCountyList").permitAll()//根据市编号获取区县列表
.antMatchers(HttpMethod.GET, "/api/adm/getStreetList").permitAll()//根据区县编号获取街道列表 .antMatchers(HttpMethod.GET, "/api/adm/getStreetList").permitAll()//根据区县编号获取街道列表
.antMatchers(HttpMethod.GET, "/selectTodayFirePoint").permitAll()
// 所有其它请求需要身份认证 // 所有其它请求需要身份认证
.anyRequest().authenticated() .anyRequest().authenticated()
.and() .and()

View File

@ -41,7 +41,7 @@ public class FirePointController {
} }
/** /**
* 动态多条件查询火点列表(Complete) * 动态多条件查询火点列表
*/ */
@GetMapping("/queryFirePoint") @GetMapping("/queryFirePoint")
public String queryFirePoint(@RequestHeader(value = "Authorization") String token, @RequestParam(value = "code", required = false) String code, @RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "satelliteType", required = false) String satelliteType, @RequestParam(value = "landType", required = false) String landType) { public String queryFirePoint(@RequestHeader(value = "Authorization") String token, @RequestParam(value = "code", required = false) String code, @RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "satelliteType", required = false) String satelliteType, @RequestParam(value = "landType", required = false) String landType) {
@ -49,7 +49,7 @@ public class FirePointController {
} }
/** /**
* 查询今天的火点信息(Complete) * 查询今天的火点信息
*/ */
@GetMapping("/selectTodayFirePoint") @GetMapping("/selectTodayFirePoint")
public String selectTodayFirePoint(@RequestHeader(value = "Authorization") String token, @RequestParam("countyCode") String countyCode) { public String selectTodayFirePoint(@RequestHeader(value = "Authorization") String token, @RequestParam("countyCode") String countyCode) {
@ -57,7 +57,7 @@ public class FirePointController {
} }
/** /**
* 动态多条件查询火点信息(Complete) * 动态多条件查询火点信息
*/ */
@PostMapping("/selectFirePoint") @PostMapping("/selectFirePoint")
public String selectFirePoint(@RequestHeader(value = "Authorization") String token, @RequestBody Map map) { public String selectFirePoint(@RequestHeader(value = "Authorization") String token, @RequestBody Map map) {
@ -70,7 +70,7 @@ public class FirePointController {
} }
/** /**
* 查询该省所有的市(Complete) * 查询该省所有的市
*/ */
@GetMapping("/selectCityName") @GetMapping("/selectCityName")
public String selectCityName(@RequestParam("code") String countyCode) { public String selectCityName(@RequestParam("code") String countyCode) {
@ -90,7 +90,7 @@ public class FirePointController {
} }
/** /**
* 根据火点编码查询火点信息 (Complete) * 根据火点编码查询火点信息
*/ */
@GetMapping("/selectFirePointByCode") @GetMapping("/selectFirePointByCode")
public String selectFirePointByCode(@RequestParam("fireCode") String fireCode) { public String selectFirePointByCode(@RequestParam("fireCode") String fireCode) {