분류 전체보기 645

[Error] Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

delete from 테이블명; Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 삭제 쿼리를 실행하니 다음과 같은 에러가 뜸 ✨ 해결 where 없이 다 삭제할 때 1. Safe Updates (rejects UPDATEs and DELETEs with no restrictions) 체크 해제 2. workbench 다시 시작 3. 삭제 쿼리 다시 실행하면 잘 된다. 참고 👇 https://l..

Languages/SQL 2022.03.19

[Error] Error creating bean with name 'emailConfig': Injection of autowired dependencies failed;

🎀 해결 이메일 서비스 테스트에서 생긴 에러 에러 로그를 자세히 보니 Jasypt 비밀번호 문제였다. 테스트할 sendMessage에 VM Option을 줬다. 🐝 에러 로그 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalStateException: either 'jasypt.encryptor.password', one of ['jasypt.encryptor.private-key-string', 'jasypt.encryptor...

JavaMailSender를 이용한 메일 전송

메일로 임시 비밀번호를 전송하는 것을 구현해보았다. implementation 'org.springframework.boot:spring-boot-starter-mail' build.gradle의 dependencies에 추가 spring.mail.host=smtp.gmail.com spring.mail.port=587 spring.mail.username=발송할이메일 spring.mail.password=비밀번호 spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.starttls.enable=true// TLS-protected 연결 허용 application-mail.properties를 생성한 후 위의 내용을 추가했..

회전 | 반전

사용 언어 파이썬 1. deque의 rotate 메소드 사용 from collections import deque 데큐명.rotate(정수) 음수 : 반시계 양수 : 시계 정수만큼 회전 2. zip 이용 def rotate90(arr) : return list(zip(*arr[::-1])) 3. 2중 for문 def rotated(a): n = len(a)# 행 길이 m = len(a[0])# 열 길이 result = [[0]* n for _ in range(m)] for i in range(n): for j in range(m): result[j][n-i-1] = a[i][j] return result 시계방향 회전 3. 좌우 반전 def reversal(arr) : result = [] for x i..

[Error] Error creating bean with name 'emailConfig': Injection of autowired dependencies failed;

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.mail.username' in value "${spring.mail.username}" at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(A..

get과 post 차이

get post 클라이언트에서 서버로 정보를 요청하기 위해 사용 또한, 값이나 내용, 상태 등을 바꾸지 않는 경우에 사용 캐시가 된다. 브라우저에 기록된다. 리소스를 생성/업데이트하기 위해 서버에 데이터 전송 서버상의 데이터 값이나 상태를 바꾸기 위해 사용 캐시가 안된다. 브라우저에 기록되지 않는다. 👇 참고 https://stackoverflow.com/questions/59712007/can-someone-please-clear-the-difference-between-getmapping-and-postmapping-in Can someone please clear the difference between @GetMapping and @PostMapping in spring also can we us..

Web 2022.02.18

[Thymeleaf] th:fragment | th:replace | th:insert

th:fragment 반복되는 코드를 재사용 ex) th:fragment="head(title)" fragment 이름이 head(title) th:replace 현재 태그를 fragment 태그로 교체 ex) th:replace="fragments/common :: head('게시판')" fragments폴더의 common파일에서 head('게시판') fragment를 가져와 교체 th:insert 태그 안에 내용 삽입 fragments/common.html에서 fragment 이 fragment는 다른 html의 공통 head로 쓸것이다. 처음에는 이렇게 head에 th:replace를 쓰니까 이 head에 작성한 것들은 다 사라진다. (문제점) th:replace는 말그대로 지정한 fragment로..

FE/html 2022.02.14