소스 검색

修改密码加密方式

王先生 2 년 전
부모
커밋
009f37d1af
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java

+ 2 - 2
eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java

@@ -110,8 +110,8 @@ public class UserController {
     @PreAuthorize("@el.check('user:add')")
     public ResponseEntity<Object> create(@Validated @RequestBody User resources) throws Exception {
         checkLevel(resources);
-//        resources.setPassword(RsaUtils.encryptByPublicKey(RsaProperties.publicKey, resources.getOrgPassword()));
-        passwordEncoder.encode(resources.getOrgPassword());
+        resources.setPassword(RsaUtils.encryptByPublicKey(RsaProperties.publicKey, resources.getOrgPassword()));
+//        passwordEncoder.encode(resources.getOrgPassword());
         userService.create(resources);
         return new ResponseEntity<>(HttpStatus.CREATED);
     }