'Web 개발/Java, SpringBoot, JPA' 카테고리의 글 목록 (4 Page)
본문 바로가기

반응형

Web 개발/Java, SpringBoot, JPA

(39)
[MySQL] Spring Boot, MySQL 연동 1. MySQL Work bench 열기 + 버튼을 클릭하여 Connections 추가 2. Connection Name 입력 3. 생성된 Connection 클릭 4. Schema 생성 5. Schema Name 입력 후 Apply 버튼 클릭 6. Apply 버튼 클릭 7. Schema 탭에서 방금 생성한 Schema 확인 8. build.gradle에 mysql 추가 dependencies{ runtimeOnly 'mysql:mysql-connector-java'} 9. yml에 mysql 추가
[MySQL] MySQL 8.0 D드라이브에 설치 방법 ========================================================= 설치파일을 통해 MySQL을 설치하면 자동으로 C드라이브에 위치하게된다. 따라서 다음과 같이 수동으로 설치하였다. 1. MySQL 공식 사이트에 접속하여 수동 설치파일을 다운로드한다. 이때, Go to Download Page를 눌러 MSI파일로 설치하면 C드라이브에 설치된다. 따라서 그 아래에 있는 ZIP 파일을 다운로드한다. https://dev.mysql.com/downloads/mysql/ 2. MySQL설치할 위치에 ZIP파일 압축을 풀어준다. C드라이브에 설치되는 위치와 동일하게 D:\Program Files\MySQL에 압축을 풀었다. 3. 환경변수 설정 제어판 > 시스템 환경변수 편집에 ..
[JPA] ConstraintViolationException could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement JPA에서 테이블명을 변경하며, 기존테이블이 존재하는 상태에서 새로운테이블이 추가했더니 해당 테이블과 FK가 걸려있던 테이블에 접근할 때 오류가 발생하였다. 결론적으로 기존테이블을 삭제하여 해결하였다.
[JPA]Error creating bean with name 'springSecurityFilterChain' defined in class path resource Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2021-06-30 23:54:20.228 ERROR 12128 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security..
[JPA] 접속중인 사용자에 대한 정보 추가 1. UserDetails 에 추가 정보 저장 public class CustomUserDetails implements UserDetails { Account user; @Override public Collection
[JPA] 로그인한 사용자 정보 가져오기 1. Config 파일 생성 @Configuration @EnableJpaAuditing(auditorAwareRef = "commonAuditorAware") public class JpaAuditingConfiguration { @Bean public AuditorAware commonAuditorAware() { /* if you are using spring security, you can get the currently logged username with following code segment. SecurityContextHolder.getContext().getAuthentication().getName() */ return new CommonAuditorAware(); } } 2. Aud..
[jQuery] val(), html() 차이 ============================================================================ .html() : 일치하는 요소 집합에서 첫번째 요소의 html 콘텐츠 가져오기 .html(value) : 일치하는 모든 요소의 HTML 콘텐츠에 value 값 설정, 이때 value는 html이어야 함 $('div1').html(' hello'); .val() : 일치하는 요소 집합에서 첫번째 요소의 현재 값 가져오기 .val(value) : 일치하는 모든 요소에 value 값 설정, 이때 value는 form요소여야함(input 등..) let val1 = $('#input1').val(); =========================================..
[JPA/Thymeleaf] An error happened during template parsing 목록을 출력하려는데, 타임리프 오류가 발생해서 타임리프 문법을 이리저리 바꿨는데 알고보니 엔티티에 Getter를 넣지 않아서 발생한 오류였다. 따라서 위와 같이 Entity에 Getter를 추가하고, Template은 위와 같이 수정하지 않았다.

반응형