계좌분리 컨틀롤러 수정

This commit is contained in:
byung eun park 2019-09-04 18:51:55 +09:00
parent 3d49e5212d
commit 5a1797add8
2 changed files with 5 additions and 3 deletions

View File

@ -76,6 +76,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/league/**") .antMatchers("/league/**")
.permitAll() .permitAll()
.anyRequest() .anyRequest()
.permitAll()
.antMatchers("/bank_info/**")
.authenticated(); .authenticated();
http.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class); http.addFilterBefore(jwtAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);

View File

@ -31,15 +31,15 @@ public class BankInfoController {
return this.bankInfoService.getAllBankInfo(pageable); return this.bankInfoService.getAllBankInfo(pageable);
} }
@PostMapping(value = "/league") @PostMapping(value = "/bank_info")
@ResponseStatus(code = HttpStatus.CREATED) @ResponseStatus(code = HttpStatus.CREATED)
public ResponseEntity<?> save(@Valid @RequestBody BankInfoEntity bankInfoEntity) throws Exception{ public ResponseEntity<?> save(@Valid @RequestBody BankInfoEntity bankInfoEntity) throws Exception{
this.bankInfoService.save(bankInfoEntity); this.bankInfoService.save(bankInfoEntity);
return ResponseEntity.ok().body(new ApiResponse(true, "BankInfo registered successfully")); return ResponseEntity.ok().body(new ApiResponse(true, "BankInfo registered successfully"));
} }
@PutMapping(value = "/league/{leagueId}") @PutMapping(value = "/bank_info/{bankInfoId}")
public ResponseEntity<?> updateLeague(@PathVariable Long leagueId, BankInfoEntity bankInfoEntity) throws Exception { public ResponseEntity<?> updateLeague(@PathVariable Long bankInfoId, BankInfoEntity bankInfoEntity) throws Exception {
BankInfoEntity leagueEntity1 = this.bankInfoService.modify(bankInfoEntity); BankInfoEntity leagueEntity1 = this.bankInfoService.modify(bankInfoEntity);
return ResponseEntity.ok(leagueEntity1); return ResponseEntity.ok(leagueEntity1);
} }