일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- springboot기본설정
- MySqlType
- 스프링부트
- springbootproxy
- 데이터베이트h2
- JPA Hint & Lock
- JDBC connection pool
- httppie
- 임베디드타입
- 제이피큐엘쿼리
- OSIV
- embededtype
- spring
- JPA값타입
- JPA프록시
- gitinitial
- dockercmd
- jpqlquery
- 에이치투데이터베이스
- JPAproxy
- sql
- JPAmapping
- springbootH2
- 스프링부트기본설정
- javageneric
- 이해와 원리
- jpa
- 자바제너릭
- Git
- Open EntityManager
- Today
- Total
목록분류 전체보기 (69)
빡코

@Primary 어노테이션을 사용하여 주입 받는 Repository의 우선순위를 결정할 수 있다. 스프링 컨테이너 없이 직접 의존성을 주입도 가능하다. 하지만 사용하는 Repository가 A에서 B클래스로 변경될 경우 직접 전체 코드를 변경해 주어야하는 번거로움이 발생한다. 이런 경우, 스프링 컨테이너를 사용하여 스프링이 직접 의존성을 관리할 수 있게 위임하여 문제를 해결 수 있다. 이것을 제어의 역전이라고 한다. @RestController public class BookController { private final BookService bookService; public BookController(BookService bookService) { this.bookService = bookServic..

Spring Project에서 MySql 데이터베이스를 추가해주고, Main > Java 패키기와 동일한 위치에 application.yml 파일을 생성해준다. Application.yml 파일 생성 및 정보 spring: datasource: url: "jdbc:mysql://localhost/library" username: "root" password: "1234" driver-class-name: com.mysql.cj.jdbc.Driver #Java Database Connecter를 사용해서 mysql에 접근하고, #접근하려는 mysql은 localhost에 있고, #접근하려는 데이터베이스는 library이다. 예제 User Table 생성 create table user( id bigint ..
create database library; show databases; drop database library; use library; show tables; create table fruit ( id bigint auto_increment, name varchar(20), price int, stocked_date date, primary key (id) ); drop table fruit; select * from fruit; #DML Data Manipulation Language insert into fruit (name, price, stocked_date) values('사과', 1000, '2023-01-01'); #생성 update fruit set price = 1500 where na..
스프링부트 3.0 + java 17 build.gradle 설정 파일 plugins { id 'java' id 'org.springframework.boot' version '3.0.0' id 'io.spring.dependency-management' version '1.1.0' } group = 'study' version = '0.0.1-SNAPSHOT' sourceCompatibility = '17' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-s..

에러 메시지 Environment health has transitioned from Ok to Warning. Initialization completed 78 seconds ago and took 90 seconds. Unable to assume role "arn:aws:iam:: 0000000000:role/역할이름". Verify that the role exists and is configured correctly. Elastic Beanstalk 에서 신규 웹 어플리케이션 생성시, 서비스 액세스 채우지 않거나 또는 적저한 IAM 역할과 권한 정책을 부여하지 않으면 발생한다. 해결 방법 aws IAM (Identity and Access Management) 콘솔에서 신규 역할 생성 및 권한 ..

새로운 엔티티를 판단하는 기본전략 -식별자가 객체일 때 null로 판단 > 새로운 것으로 판단 -식별자가 자바 기본타입일 때 0으로 판단 ex) private long id ; 자바의 기본형이기 때문에 객체가 아니고, Null을 넣을 수 없기 때문에 0으로 판다 - Persistable인터페이스를 구현해서 판단로직 변경가능(실무에서 사용) id 값이 자동생성이 아닌 특별한 경우에 의하여 직접 채번이 된다고 가정해보자 . @Entity @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) public class Item { @Id private String id; public Item(String id) { this.id = id; } } @SpringB..