inflearn logo
Khóa học

Khóa học

Chia sẻ kiến thức

Bài viết của qheogus55

qheogus55 qheogus55

@qheogus555834

Số lượng đánh giá đã viết
-
Xếp hạng trung bình
-

Bài viết 9

Hỏi & Đáp

안녕하세요 강사님! 질문있습니다.!

public enum Role { ROLE_CUSTOMER, ROLE_SELLER; } // public class Customer extends BaseTimeEntity { @Enumerated(EnumType.STRING) private Role role; } @Override public Collection getAuthorities() { Collection authorities = new ArrayList (); authorities.add(new GrantedAuthority() { @Override public String getAuthority() { return customer.getRole().toString(); } }); return authorities; } @Override public void signUpCustomer(CustomerSignUpDto customerSignUpDto) throws Exception { Customer customer = customerSignUpDto.toEntity(); customer.encodePassword(passwordEncoder); customer.addCustomerAuthority(); if (customerRepository.findByUsername(customer.getUsername()).isPresent()) { throw new Exception("이미 존재하는 아이디입니다."); } customerRepository.save(customer); } public void addSellerAuthority(){ this.role = Role.ROLE_SELLER; } 답변 매우감사드립니다!! 혹시 이 코드도 제대로 동작하는데 문제없을까요?..

Lượt thích
0
Số bình luận
2
Lượt xem
647

Hỏi & Đáp

H2연결오류 입니다.

빠르고 친절한답변 매우 감사드립니다

Lượt thích
0
Số bình luận
3
Lượt xem
421

Hỏi & Đáp

JSON 형식으로 파싱하는 이유?..

시간내주셔서 친절한 답변해주신 OMG님 진심으로 감사드립니다!

Lượt thích
1
Số bình luận
3
Lượt xem
916

Hỏi & Đáp

v3,v4,v5 화이트라벨오류

힘드실텐데 시간낭비하게해서.. 죄송하고 감사합니다 ㅠ

Lượt thích
0
Số bình luận
7
Lượt xem
786

Hỏi & Đáp

v3,v4,v5 화이트라벨오류

죄송합니다 해보았지만 오류가뭔지몰라서 구글드라이버주소올리겠습니다ㅜㅜ. https://drive.google.com/file/d/17lkrjhbYaYvOoTMCYbuvR9U7Wll9HSUg/view?usp=sharing 항상 친절한답변감사드립니다

Lượt thích
0
Số bình luận
7
Lượt xem
786

Hỏi & Đáp

v3,v4,v5 화이트라벨오류

Execution failed for task ':ServletApplication.main()'. > Build cancelled while executing task ':ServletApplication.main()' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 오류가 뜨고 이렇게 설정하였습니다

Lượt thích
0
Số bình luận
7
Lượt xem
786