본문 바로가기

스프링12

인증 이메일 보내기 인증 이메일을 보낼 이메일(Google, Naver ...)마다 다르겠지만 추가적인 이메일 설정이 필요합니다. 저는 Gmail을 사용했습니다. Gmail 설정은 이 링크를 참고하세요! Gradle implementation'org.springframework.boot:spring-boot-starter-mail' Mailconfig @Configuration public class MailConfig { @Value("${email.id}") private String fromId; @Value("${email.password}") private String password; @Bean public JavaMailSender getJavaMailSender() { JavaMailSenderImpl mai.. 2024. 1. 24.
JWT Token Service 개발 중 고민, Tip 🖤 Key 값 생성 사이트 https://www.devglan.com/online-tools/jasypt-online-encryption-decryption 사용자 경험을 고려하여 엑세스 토큰 기간을 설정하는 것이 좋다. 일단 1시간으로 설정 환경변수 설정하는 법 출처: https://mchch.tistory.com/282 🖤 jwt gradle 설정(spring3) implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5' runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.5' runtimeOnly group: 'io.jsonwebtoken', n.. 2024. 1. 24.
[쿼리문 개선] 댓글/대댓글 조회 dto로 받기 기존코드 PostCommentGetService @Service @RequiredArgsConstructor public class PostCommentGetService { private final PostCommentRepositoryCustom postCommentRepositoryCustom; @Transactional public List getPostComment(long postId) { List postCommentList = postCommentRepositoryCustom.findByPostId(postId); List responseList = new ArrayList(); Map responseHashMap = new HashMap(); postCommentList.forEach(p.. 2023. 11. 27.