일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- COALESCE
- Jenkins
- chart.js
- Spring
- codepipeline
- VPN
- Spring Error
- IntelliJ
- aws cicd
- Python
- redis
- codedeploy error
- aws
- codedeploy
- java bigdecimal
- kubeflow
- codebuild
- or some instances in your deployment group are experiencing problems.
- docker
- AWS CI/CD 구축하기
- 도커
- JavaScript
- node
- Kafka
- PostgreSQL
- chartjs
- Flux
- Airflow
- SQL
- bootstrap
- Today
- Total
목록백엔드/Spring (134)
Small Asteroid Blog
@OneToMany(mappedBy = "apiInfoEntity", cascade = CascadeType.ALL, orphanRemoval = true) 보통 1:N 관계 테이블 설정할때 저렇게 옵션을 추가해준다. 자식 엔티티의 변경이 있다면 JPA 에서 자식엔티티의 수정은 insert update update delete 순으로 이어지는데 변경된 자식을 먼저 insert 하고 기존의 자식을 NULL로 update 한다. 그리고 orphanRemoval 옵션을 true 로 하면 기존 NULL처리된 자식을 DELETE 한다. PK(JoinColumn)값이 NULL로 변한 자식은 고아객체라고 하여 연결된 점이 없는 객체이다. orphanRemoval옵션은 바로 이 고아객체를 삭제해주는 역활을 한다. @O..
thymeleaf 에서 컨트롤러에서 넘겨받은 URL 변수로 특정 태그에 onclick을 이용해 페이지 이동을 하고싶을때 (location.href 사용) 아래와 같이 사용하면 된다 목록으로 th:onclick="'window.location.href=\''+@{/list}+'\''" th:onclick="'window.location.href=\''+@{/list}+'\''" th:onclick="'window.location.href=\'/update?no=' + ${key} + '\''" Variable Expressions: ${...} Link URL Expressions: @{...}

db안에 테이블이 없어서 생기는 오류이다. db연결은 되었는데 테이블 이름이 없다고 연결되지 않아 페이지가 로드가 되지 않았다. 처음 작성할 때는 테이블 안에 @Table(name="") 에서 name만 정의했었는데 schema까지 정의해서 작성해주어야 한다. > ApiInfoEntity > application.properties source.url=jdbc:postgresql://localhost/postgres
다음과 같은 에러가 나는데는 3가지 경우가 있다. 1. column이 없어서 그런경우 2. 문자열로 준 데이터가 더블 쿼테이션으로 둘러싸여 있지 않은 경우 (문자열로 인식 못해서) ${test} 를 #{test} 로 변경 3. dto나 service에서 호출을 못하는 경우 나의 경우 2번에 해당하는 에러로 ${test} 를 #{test} 로 변경해주었더니 해결되었다.

방법1. Table 'DB_NAME.hibernate_sequence' doesn't exist 의 오류가 나오면 다음 내용을 추가 spring.jpa.hibernate.use-new-id-generator-mappings=false 방법 2 @Id //@GeneratedValue(strategy= GenerationType.SEQUENCE) @GeneratedValue(strategy= GenerationType.IDENTITY) private Integer id; SEQUENCE 대신 IDENTITY를 사용한다
포트번호 변경 server.port=8082 데이터베이스 연결 # Database #driver-class-name 은 사용하고자 하는 데이터베이스로 #spring.datasource.driver-class-name=org.mariadb.jdbc.Driver spring.datasource.driverClassName=org.mariadb.jdbc.Driver #spring.datasource.url=데이터베이스 주소 spring.datasource.url=jdbc:mariadb://localhost:3306/gtck?characterEncoding=UTF-8&serverTimezone=UTC spring.datasource.username=아이디 spring.datasource.password=비밀번호..