inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

클래스 실행 순서가 궁금합니다.

해결됨

그림으로 배우는 자바, 파트2: 객체지향!

정답 코드 입니다. public class PlayerTest { public static void main(String[] args) { // 점수 배열 생성 int[] points0 = { 10, 9, 9, 8 }; int[] points1 = { 9, 10, 9, 9 }; int[] points2 = { 10, 9, 10, 10 }; // 선수 객체 생성 Player p0 = new Player("Kim", points0); Player p1 = new Player("Lee", points1); Player p2 = new Player("Park", points2); // 객체 배열 만들기 Player[] players = { p0, p1, p2 }; // 선수별 총점 출력 for (int i = 0; i < players.length; i++) { players[i].printTotalPoints(); } } } class Player { // 필드 String name; // 이름 int[] points; // 점수 // 생성자 Player(String str, int[] arr) { name = str; points = arr; } // 메소드 void printTotalPoints() { /* 2. 형식 문자열을 만드세요. */ System.out.printf("%s -> %d점\n", name, totalPoints()); } int totalPoints() { int sum = 0; for(int i = 0; i < points.length; i++){ sum += points[i]; } return sum; } } 위의 코드에서 'totalPoints()'메소드를 안에있는 for문 조건식 i<points.length; 대신 점수 배열을 크키를 구하는데 저는 main메소드가 먼저 실행되는 것으로 알고 있어 points0 배열이 생성될 때 값도 대입했기 때문에 바로 크기를 알 수 있을 것으로 판단해 아래와 같이 points0.length 또는 points[i].length 를 사용하려고 했으나 불가능하였습니다. for(int i = 0; i < points0.length; i++){ sum += points[i]; } 혹시나 main 메소드 부터 실행되는 것이 아니라면 points변수에 static을 부여해 프로그램이 시작하자마자 점수 배열을 생성을 하고 point[i].length를 사용해봤으나 'illegal start of expression' 라며 잘못된 표현이라는 에러가 나왔습니다. static int[] points0 = { 10, 9, 9, 8 }; static int[] points1 = { 9, 10, 9, 9 }; static int[] points2 = { 10, 9, 10, 10 }; 위와 같은 방법으로 풀면 왜 에러가 나는지 궁금합니다!

  • 객체지향
  • oop
  • java
하람 댓글 2 좋아요 0 조회수 691

추상 클래스 / 익명 클래스

미해결

나도코딩의 자바 기본편 - 풀코스 (20시간)

강사님, 안녕하세요. 우선 많은 강의 내용 중 생기는 질문에 대해서 항상 친절하게 답변해주시는 점 감사드립니다. 😊 다름이 아니고 익명 클래스 (후반전) 에서 추상 클래스를 직접 상속받아서 객체 생성과 동시에 메서드를 오버라이드 하는 것과 객체 메서드로 반환받아 하는 것이 어떠한 기능적인 차이가 있는 것인지 궁금하여 여쭤봅니다! 개인적으로는 별도의 메서드로 객체를 반환 받는 형태가 직관적으로 와닿지 않아서 어렵게 느껴지는 듯 합니다. 단순히 코드의 유지보수나 가독성을 높이는 목적 때문에 추상 클래스의 메서드를 직접 상속받는 형태보다 익명클래스를 활용해 메서드로 객체를 반환받는 형식으로 하는걸까요?

  • java
  • 객체지향
  • oop
흰머리오목눈이 댓글 1 좋아요 1 조회수 692

강의별 전체 코드 git으로 받아볼 수 있을까요?

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

안녕하세요 선생님께서 강의하시는 강의별 전체 코드를 받아볼 수 있는 git 주소가 있을까요? 전체 정답 코드를 보지 못하고 따라하다보니 에러가 많이 나서 선생님 것으로 확인해보고자 합니다. 그럼 답변 기다리겠습니다. 감사합니다.

  • nodejs
  • node.js
  • tdd
  • docker
  • express
  • javascript
  • rest-api
  • nestjs
  • NestJS
LI 댓글 1 좋아요 1 조회수 363

스프링과 스프링부트 질문합니다

해결됨

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

기존에 인터넷을 보면 스프링과 스프링부트를 분리하여서 스프링 하기전에 스프링 부트를하라고 이야기도 하고, 기업에서 스프링은 어떤데 스프링부트는 이러하다 다른 기술스택이라는식의 영상과 글들을 접해왔는데요 스프링 강의인데 스프링 부트로 진행하시고 다른 강사님들도 그렇게 하시더라고요 여기서 궁금한게 스프링과 스프링부트는 구별하지 않아도 되는걸까요?(그냥 스프링과 스프링부트를 혼용해서 써도 되는건지) 스프링부트가 아닌 스프링은 어떻게 공부해야할까요? 기업에서는 스프링부트가 아닌 스프링을 더 선호하나요?

  • java
  • JPA
  • spring-boot
  • mysql
  • jpa
  • spring
  • aws
김준식 댓글 1 좋아요 3 조회수 1537

맛집 클릭시 상세조회 부분에서 오류가 생겨요ㅜㅜ

미해결

비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지

return에서 기존 hello 문구를 지우고 엔터를 치면 여기서 부터 오류가 떠요 그리고 이렇게html에서 js로 옮기는 과정에서 오류가 뜨는데 어떻게 해야되나요?

  • html/css
  • HTML/CSS
  • github
  • git
  • javascript
  • mysql
  • rest-api
  • rest-api
  • aws
박선희 댓글 2 좋아요 0 조회수 348

메인페이지 헤더 회원/비회원 표시

미해결

비전공자를 위한 풀스택 맛집지도 만들기 프로젝트!: Front, Back-end 그리고 배포까지

로그인이나 회원가입 후 메인페이지 헤더 부분에 비회원과 회원 구분하는 바가 나오지 않습니다. header.js코드는 그대로 복붙하고 url 에서 포트만 3001 -> 3000 으로 바꿨습니다 back end의 indexRoute에서 아래 app.get("/jwt", jwtMiddleware, index.readJwt); 코드도 잘 추가하였는데 문제가 어떤건지 모르겠습니다 ㅠㅠ

  • html/css
  • mysql
  • git
  • rest-api
  • javascript
  • aws
  • HTML/CSS
  • github
리리릴 댓글 1 좋아요 0 조회수 720

프록시의 특징 질문

해결됨

자바 ORM 표준 JPA 프로그래밍 - 기본편

안녕하세요! 영한님 질문 드립니다. 질문 1) 만약 동일한 트랜잭션안에서 처음에 em.getReference() 를 사용하면 프록시 객체 를 반환하고, em.find() 를 사용해도 프록시 객체 를 반환한다. 반대의 경우 동일한 트랜잭션안에서 처음에 em.find() 를 사용하면 실제 엔티티 가 반환되고, em.getReference() 를 사용해도 실제 엔티티 를 반환한다. 제가 이해한게 맞을까요? 질문 2) em.getReference() 를 사용하여 프록시 객체를 조회한 프록시 객체도 결국 EntityManager 를 사용하여 조회한 것이기 때문에 영속성 컨텍스트에서 관리 되는 것 같은데 맞을까요? 감사합니다.^^

  • java
  • jpa
  • JPA
개발하는쿼카 댓글 1 좋아요 2 조회수 586

순환 참조 오류 문의드립니다.

미해결

스프링 시큐리티

안녕하세요 강의 내용을 따라 코딩을 했는데 순환 참조 문제가 생겨 문의 드립니다. securityConfig와 AppConfig 설정에서SecurityResourceService를 생성하면서 생긴 문제인데요. 깃허브에 강의 자료를 확인해보니 영상에서 설정한 로직과 securityConfig 로직이 많이 다르더라구요. 임시로 application.properties에 spring.main.allow-circular-references=true 설정 하여 구동은 되지만 해결방법을 찾지 못하여 강사님께 도움을 요청 드립니다..

  • spring-boot
  • java
  • spring-boot
  • spring-security
  • Spring Security
딩동0814 댓글 2 좋아요 0 조회수 565

swagger 3 질문입니다.(Step 24)

미해결

[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발

안녕하세요 springboot 3에서는 swagger 2를 이용할 수 없더라구요. ( 추가로 강의자료에서 제공해주신 springfox3 버전을 이용해도 index.html에 접속이 되질 않아 springdoc으로 진행하는 상황입니다.) 그래서 springdoc, swagger3를 사용하여 http://localhost:8088/swagger-ui/index.html로 들어가 실습을 진행하고 있습니다. 강의자료를 참고하여 springfox형식을 springdoc에 맞춰 작성하여 info, contact,license 까지 확인할 수 있었습니다. 그런데 produce,consume 부분을 구현하지 못했는데 springdoc에서는 produce,consume이 없어진건가요? 아니면 다른 방법이 있을까요? 강의자료는 springfox 기준이라서 아직 produce, consume 부분을 해결하지 못한 상태입니다. package com.example.restfulwebservice.config; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Contact; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.mvc.condition.ProducesRequestCondition; import java.util.Arrays; import java.util.HashSet; import java.util.Set; @Configuration public class SwaggerConfig { private static final Contact CONTACT = new Contact().name("Kenneth Lee") .url("http://www.joneculsting.co.kr") .email("edowon@joneconsluting.co.kr"); private static final License LICENSE= new License().name("Apache 2.0") .url("http://www.apache.org/licenses/LICENSE-2.0"); private static final Info INFO = new Info().title("Awesome API Title") .contact(CONTACT) .description("Awesome API Documentation") .version("1.0") .license(LICENSE) .termsOfService("urn:tos"); private static final Set<String> DEFAULT_PRODUCES_AND_CONSUMES = new HashSet<>(Arrays.asList("application/json", "application/xml")); @Bean public OpenAPI springShopOpenAPI() { return new OpenAPI().info(INFO).; } }

  • rest-api
  • rest-api
  • spring-boot
  • spring-boot
김관주 댓글 0 좋아요 0 조회수 715

offset 과 limit 값을 서버쪽으로 보내는 방식

미해결

실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화

안녕하세요 강의에서는 페이징에 필요한 offset과 limit 값을 @RequestParam을 통해서 넘겨주는 것을 보았습니다. 그런데, 저는 현재 @RequestBody OrderSearchDto를 파라미터로 받아와 내부 필드인 멤버명이나 주문 상태를 검색조건으로 활용하고 있었습니다. 이런 경우에는 그냥 @RequestParam을 사용하지 않고, DTO에 offset과 limit 필드를 추가해서 검색과 페이징에 필요한 데이터를 OrderSearchDto 안에 한번에 받는것은 어떤지 궁금합니다. 보통 실무에서는 페이징에 필요한 값은 @RequestParam으로 받는 편인가요? 아니면 저의 발상처럼 OrderSearchDto 같은 DTO를 통해 @RequestBody로 받기도 하나요? 일반적인 관점에서 best practice가 따로 있는지 궁금합니다.

  • java
  • spring
  • jpa
  • JPA
  • spring-boot
이현준 댓글 1 좋아요 0 조회수 635

username뿐만 아니라 password까지 검증되는 이유

미해결

스프링 시큐리티

현재 강의까지의 인증 로직을 보면 @Service @RequiredArgsConstructor public class CustomUserDetailsService implements UserDetailsService { private final UserRepository userRepository; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { Account account = userRepository.findByUsername(username); if (account == null) { throw new UsernameNotFoundException("UsernameNotFoundException"); } List<GrantedAuthority> roles = new ArrayList<>(); roles.add(new SimpleGrantedAuthority(account.getRole())); AccountContext accountContext = new AccountContext(account, roles); return accountContext; } } useranme으로만 Account객체를 조회해서 이것이 null인지 아닌지로 사용자를 인증하는 로직으로 이해했습니다. 하지만 로그인 페이지에서 DB에 존재하는 username을 알맞게 입력하고 password는 틀리게 입력하면 인증단계에서 걸러지는걸 확인했습니다. 그렇다면 password까지 검증을 한다는 것인데.. 분명 인증로직으로만 봤을땐 username으로만 인증을 하는것 같았는데 password까지 검증될 수 있었던 이유가 무엇인가요.?

  • Spring Security
  • spring-boot
  • java
  • spring-security
  • spring-boot
조우현 댓글 1 좋아요 0 조회수 1288

HelloMessage.Message 프로퍼티 여부에 따른 다른 동작

해결됨

[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part6: 웹 서버

선생님 안녕하세요! 최신 버전의 VS2022 .NET7.0 환경에서도 실습이 잘 되어서 너무 기분이 좋습니다. c# 문법인지 잘 모르겠지만... 이해가 안 가는 것이 있어 질문 올립니다. ' Hello MVC #1 ' 강의 14:29에서 다음과 같이 작성하셨습니다. public string Message { get; set; } 하지만, { get; set; } 을 하지 않고 아래와 같이 작성 public string Message; 하면 앞으로 모든 실습에서 Message가 null이 됩니다. 디버그에서 특별한 에러도 나타나지 않습니다. 강의 내용대로 프로퍼티를 붙이면 간단히 해결할 수 있지만 이 차이가 무엇인지 자세히 알고 싶습니다. 프로퍼티를 사용한 경우 프로퍼티 없이 선언만 한 경우

  • rest-api
  • blazor
  • web-api
  • ASP.NET-Core
  • asp.net-core
  • rest-api
Bonnate 댓글 1 좋아요 0 조회수 513

강의에서 배운 상품 CRUD를 RESTAPI 로 바꾸기

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

강의에서 배운 상품 CRUD를 RESTAPI로 바꿔보고 싶은데, 이게 해볼만한 시도일까요? 참조할만한 자료가 있을까요?

  • express
  • node.js
  • tdd
  • javascript
  • nodejs
  • rest-api
  • docker
  • nestjs
  • NestJS
LI 댓글 1 좋아요 0 조회수 289

N:M 등록 / 조회 API

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

query{ fetchProduct(productId:"7967c808-532f-48e8-87b7-4f4536ab1903"){ id name description price isSoldout productSaleslocation{ id address addressDetail lat lng meetingTime } productCategory{ id name } productTags{ id name } } } { "errors": [ { "message": "Cannot return null for non-nullable field Query.fetchProduct.", "locations": [ { "line": 2, "column": 3 } ], "path": [ "fetchProduct" ], "extensions": { "code": "INTERNAL_SERVER_ERROR", "exception": { "stacktrace": [ "Error: Cannot return null for non-nullable field Query.fetchProduct.", " at completeValue (C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\graphql\\execution\\execute.js:594:13)", " at C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\graphql\\execution\\execute.js:486:9", " at processTicksAndRejections (node:internal/process/task_queues:96:5)", " at async Promise.all (index 0)", " at execute (C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\apollo-server-core\\src\\requestPipeline.ts:501:14)", " at processGraphQLRequest (C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\apollo-server-core\\src\\requestPipeline.ts:407:22)", " at processHTTPRequest (C:\\Users\\enter\\OneDrive\\바탕 화면\\agarang-camp\\19-01-typeorm-crud-many-to-many\\node_modules\\apollo-server-core\\src\\runHttpQuery.ts:436:24)" ] } } } ], "data": null } 똑같이 따라헀는데, fetchproduct 부분에서 왜 이런 오류가 발생하는 것일까요? product.entity.ts 를 아래와 같이 nullable: true로 수정했는데도 플레이 그라운드에서 똑같은 에러가 나옵니다. ======================== import { Field, Int, ObjectType } from '@nestjs/graphql'; /* eslint-disable prettier/prettier */ // product.entity.ts import { ProductCategory } from 'src/apis/productCategory/entities/productCategory.entity'; import { ProductSaleslocation } from 'src/apis/productsSaleslocation/entities/productSaleslocation.entity'; import { ProductTag } from 'src/apis/productTags/entities/productTag.entity'; import { User } from 'src/apis/users/entities/user.entity'; import { Column, DeleteDateColumn, Entity, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToOne, PrimaryGeneratedColumn, } from 'typeorm'; @Entity() @ObjectType() export class Product { @PrimaryGeneratedColumn('uuid') @Field(() => String) id: string; @Column() @Field(() => String) name: string; @Column() @Field(() => String) description: string; @Column() @Field(() => Int) price: number; @Column({ default: false }) //시작시 디폴트값 @Field(() => Boolean) isSoldout: boolean; // soldedAt: Date // @Column({ default: false }) //시작시 디폴트값 // @Field(() => Boolean) // isDeleted: boolean; // @Column({ default: null }) //시작시 디폴트값 // @Field(() => Date) // DeletedAt: Date; @DeleteDateColumn() @Field({ nullable: true }) deletedAt: Date; @JoinColumn() @OneToOne(() => ProductSaleslocation) @Field(() => ProductSaleslocation) productSaleslocation: ProductSaleslocation; @ManyToOne(() => ProductCategory) @Field(() => ProductCategory) productCategory: ProductCategory; @ManyToOne(() => User) @Field(() => User, { nullable: true }) user: User; @JoinTable() @ManyToMany(() => ProductTag, (productTags) => productTags.products) @Field(() => [ProductTag]) productTags: ProductTag[]; } /*tag가 배열이다 그래프QL에서 배열은 양쪽으로 감싸는 게 배열이다. */ 위 product.enttity.ts를 수정한 이유는 DB에 deletedAt 컬럼이 null, userId 컬럼이 null로 되어 있어서 아래와 같이 추가해주었습니다. 그래도 똑같은 에러가 발생하네요. @Field({ nullable: true }) deletedAt: Date; @ManyToOne(() => User) @Field(() => User, { nullable: true }) user: User;

  • docker
  • node.js
  • javascript
  • express
  • nodejs
  • rest-api
  • nestjs
  • tdd
  • NestJS
LI 댓글 1 좋아요 0 조회수 660

1:1 관계 등록 API 질문입니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

//18-03의 방법 2. 상품과 상품 거래위치를 같이 등록하는 경우 async create({ createProductInput }) { const { productSaleslocation, ...product } = createProductInput; console.log( '어떻게 받아오는지 createProductInput:::::::::찍어보자 ', createProductInput, ); console.log( '서비스단에서 productSaleslocation::::::::', productSaleslocation, ); // console.log('서비스단에서...product:::::::::::::::', ...product); const result = await this.productSaleslocationRepository.save({ ...productSaleslocation, // }); console.log('서비스단에서 result:::::', result); const result2 = await this.productRepository.save({ ...product, productSaleslocationId: result.id, }); console.log('서비스단에서 result2:::::', result2); return result2; } 위를 grpahql 에서 데이터를 전송해보면, 터미널창에서 아래와 같이 나옵니다. 어떻게 받아오는지 createProductInput:::::::::찍어보자 [Object: null prototype] { name: '마우스', description: '참좋은마우스', price: 2000, productSaleslocation: [Object: null prototype] { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z } } 서비스단에서 productSaleslocation:::::::: [Object: null prototype] { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z } query: START TRANSACTION query: INSERT INTO `product_saleslocation`(`id`, `address`, `addressDetail`, `lat`, `lng`, `meetingTime`) VALUES (?, ?, ?, ?, ?, ?) -- PARAMETERS: ["f6bc848d-42ff-42c5-a454-39e8a9106dac","구로","구로역",1,1,"2022-10-30T00:00:00.000Z"] query: COMMIT 서비스단에서 result::::: { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z, id: 'f6bc848d-42ff-42c5-a454-39e8a9106dac' } query: START TRANSACTION query: INSERT INTO `product`(`id`, `name`, `description`, `price`, `isSoldout`, `deletedAt`, `productSaleslocationId`, `productCategoryId`, `userId`) VALUES (?, ?, ?, ?, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT) -- PARAMETERS: ["a09e9c56-4b45-420d-98ec-c075da6014e0","마우스","참좋은마우스",2000] query: SELECT `Product`.`id` AS `Product_id`, `Product`.`isSoldout` AS `Product_isSoldout`, `Product`.`deletedAt` AS `Product_deletedAt` FROM `product` `Product` WHERE ( `Product`.`id` = ? ) AND ( `Product`.`deletedAt` IS NULL ) -- PARAMETERS: ["a09e9c56-4b45-420d-98ec-c075da6014e0"] query: COMMIT 서비스단에서 result2::::: { name: '마우스', description: '참좋은마우스', price: 2000, productSaleslocationId: 'f6bc848d-42ff-42c5-a454-39e8a9106dac', deletedAt: null, id: 'a09e9c56-4b45-420d-98ec-c075da6014e0', isSoldout: false } 어떻게 받아오는지 createProductInput:::::::::찍어보자 [Object: null prototype] { name: '마우스', description: '참좋은마우스1', price: 2000, productSaleslocation: [Object: null prototype] { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z } } 서비스단에서 productSaleslocation:::::::: [Object: null prototype] { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z } query: START TRANSACTION query: INSERT INTO `product_saleslocation`(`id`, `address`, `addressDetail`, `lat`, `lng`, `meetingTime`) VALUES (?, ?, ?, ?, ?, ?) -- PARAMETERS: ["33a4c94a-886d-4f76-9226-a363afc4b7e4","구로","구로역",1,1,"2022-10-30T00:00:00.000Z"] query: COMMIT 서비스단에서 result::::: { address: '구로', addressDetail: '구로역', lat: 1, lng: 1, meetingTime: 2022-10-30T00:00:00.000Z, id: '33a4c94a-886d-4f76-9226-a363afc4b7e4' } query: START TRANSACTION query: INSERT INTO `product`(`id`, `name`, `description`, `price`, `isSoldout`, `deletedAt`, `productSaleslocationId`, `productCategoryId`, `userId`) VALUES (?, ?, ?, ?, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT) -- PARAMETERS: ["a97bb588-3074-4f1b-abaf-a9d244616dd3","마우스","참좋은마우스1",2000] query: SELECT `Product`.`id` AS `Product_id`, `Product`.`isSoldout` AS `Product_isSoldout`, `Product`.`deletedAt` AS `Product_deletedAt` FROM `product` `Product` WHERE ( `Product`.`id` = ? ) AND ( `Product`.`deletedAt` IS NULL ) -- PARAMETERS: ["a97bb588-3074-4f1b-abaf-a9d244616dd3"] query: COMMIT 서비스단에서 result2::::: { name: '마우스', description: '참좋은마우스1', price: 2000, productSaleslocationId: '33a4c94a-886d-4f76-9226-a363afc4b7e4', deletedAt: null, id: 'a97bb588-3074-4f1b-abaf-a9d244616dd3', isSoldout: false } 강의에서 설명해주신 코드는 const result2 = await this.productRepository.save({ ...product, productSaleslocation: result, }); console.log('서비스단에서 result2:::::', result2); return result2; } ...product를 하면 product 테이블에 product와 관련된 데이터(name, description, price) 가 DB 테이블에 들어가는 것은 이해가 되었는데, productSaleslocation: result 라고 하면, DB에 lnt, lng, meetingtime, address, adressDetail까지 전부 들어가는 게 아닌가요? 왜 DB를 확인해보면, productSaleslocation의 id 값만 productSaleslocationId 컬럼에 들어가게 되는 것인가요? 그래서 product 테이블에 productSalesloactionId 라는 컬럼이 있어서 아래와 같이 result2 코드를 작성해보았습니다. const result2 = await this.productRepository.save({ ...product, productSaleslocationId: result.id, }); 이렇게 코드를 작성하면, 상품테이블에 productSaleslocationId 컬럼이 있으니, productSaleslocationId : result.id 를 해줘서 DB에 productSaleslocationId 값을 넣을 수 있는게 왜 아닌지 이해가 가지 않습니다. 왜 productSaleslocationId : result.id 라고 하면 터미널창에는 찍히지만, DB에 아무것도 들어가지 않는 것일까요? 오히려 productSaleslocation: result 라고 하면, productSaleslocation의 lnt, lng, meetingtime, address, adressDetail 은 하나도 들어가지 않고, 어떠한 에러가 발생하지 않고, productSaleslocation의 id값만 외래키로 DB에 잘 들어가게 되는것일까요?

  • node.js
  • express
  • tdd
  • nodejs
  • rest-api
  • docker
  • javascript
  • nestjs
  • NestJS
LI 댓글 1 좋아요 0 조회수 343

testdb 궁금증.

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

저는 testdb 라고 안뜨고 url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37| 이렇게 나오는데, 같은 맥락인가요? --전체 콘솔-- /Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=54927:/Applications/IntelliJ IDEA CE.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA CE.app/Contents/plugins/junit/lib/junit5-rt.jar:/Applications/IntelliJ IDEA CE.app/Contents/plugins/junit/lib/junit-rt.jar:/Users/hyoozo/Documents/study/jpashop/out/test/classes:/Users/hyoozo/Documents/study/jpashop/out/test/resources:/Users/hyoozo/Documents/study/jpashop/out/production/classes:/Users/hyoozo/Documents/study/jpashop/out/production/resources:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-data-jpa/3.0.2/fc0dbe82effb33d3d89b4cf2ec6b7968ad2af558/spring-boot-starter-data-jpa-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-thymeleaf/3.0.2/e79481a7c3984941b9f9c73271867e4fcb4c0cc5/spring-boot-starter-thymeleaf-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/3.0.2/3f6a2cb4cb11bac3611f5a95e234589eb190dd29/spring-boot-starter-web-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-devtools/3.0.2/8e74cf503d8f8b66960ecf3780446c5750866aa6/spring-boot-devtools-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.github.gavlyukovskiy/p6spy-spring-boot-starter/1.5.6/495579c7fb01b005f19ec4d5188245c66de0937b/p6spy-spring-boot-starter-1.5.6.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.22/9c08ea24c6eb714e2d6170e8122c069a0ba9aacf/lombok-1.18.22.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.testng/testng/7.1.0/b0bcea778fb2899aeb4014c558babea8833d180a/testng-7.1.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-test/3.0.2/167ec01ebb1d4d5f955aa25e027fe25336116925/spring-boot-starter-test-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.vintage/junit-vintage-engine/5.9.2/53421816bde124a564a64ba005dcc0c8e66a9722/junit-vintage-engine-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-aop/3.0.2/cfb3ff6a7f8d47c9703f140387f39a837b81ab52/spring-boot-starter-aop-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-jdbc/3.0.2/662285456edce14301de88fc0ab4937643a51b50/spring-boot-starter-jdbc-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.hibernate.orm/hibernate-core/6.1.6.Final/e2ff7dfc50d16377da7bedbf48a0a2e9db30ac66/hibernate-core-6.1.6.Final.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-jpa/3.0.1/96f4ea7c780b6c902f83f4fd3c98dffe3ac5fbec/spring-data-jpa-3.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aspects/6.0.4/5baf7a2260278ca9748be9dd8278d6519ff2da00/spring-aspects-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/3.0.2/a9426629b5a83ad64fbe4e1d24081cccf4cdab14/spring-boot-starter-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.thymeleaf/thymeleaf-spring6/3.1.1.RELEASE/deb52ef921a4ac5132fedb7ebfc2bc1dad4382b3/thymeleaf-spring6-3.1.1.RELEASE.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-json/3.0.2/11b9a2903af9014696d2576605bb73e8bca6ee19/spring-boot-starter-json-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/3.0.2/4d50f0cdcb4b8f74221ae823dd77c18290473045/spring-boot-starter-tomcat-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/6.0.4/84ee8a9107480c92186ef8216ba0e1dca6ee1665/spring-webmvc-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/6.0.4/de18e3e75a0e56534d9df5978bd2f43f950e1b4a/spring-web-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/3.0.2/42ad589ec930e05a2ed702a4940955ff97b16a8c/spring-boot-autoconfigure-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/3.0.2/69d2e0a07f7df180a4aacdc47c47a3db656857dc/spring-boot-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.github.gavlyukovskiy/datasource-decorator-spring-boot-autoconfigure/1.5.6/cac386fe9df77870133594f054ee32e5d08ab93d/datasource-decorator-spring-boot-autoconfigure-1.5.6.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/p6spy/p6spy/3.8.2/52299d9a1ec2bc2fb8b1a21cc12dfc1a7c033caf/p6spy-3.8.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.beust/jcommander/1.72/6375e521c1e11d6563d4f25a07ce124ccf8cd171/jcommander-1.72.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.google.inject/guice/4.1.0/faf9ee8ac09eafd1128091426dd367a8c0085d55/guice-4.1.0-no_aop.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.33/2cd0a87ff7df953f810c344bdf2fe3340b954c69/snakeyaml-1.33.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter/5.9.2/26c586fbe0ebd81b48c9f11f0d998124248697ae/junit-jupiter-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test-autoconfigure/3.0.2/54b535d617cd5dce97b520f6224ef10a76b4a32a/spring-boot-test-autoconfigure-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test/3.0.2/b014e6596a04ce4aa374ca3cd6361489afab8680/spring-boot-test-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.jayway.jsonpath/json-path/2.7.0/f9d7d9659f2694e61142046ff8a216c047f263e8/json-path-2.7.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0/bbb399208d288b15ec101fa4fcfc4bd77cedc97a/jakarta.xml.bind-api-4.0.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.assertj/assertj-core/3.23.1/d2bb60570f5b3d7ffa8f8000118c9c07b86eca93/assertj-core-3.23.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest/2.2/1820c0968dba3a11a1b30669bb1f01978a91dedc/hamcrest-2.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-junit-jupiter/4.8.1/e393aa62eca2244a535b03842843f2f199343d1f/mockito-junit-jupiter-4.8.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/4.8.1/d8eb9dec8747d08645347bb8c69088ac83197975/mockito-core-4.8.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.skyscreamer/jsonassert/1.5.1/6d842d0faf4cf6725c509a5e5347d319ee0431c3/jsonassert-1.5.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-test/6.0.4/e8a07171dc49379f7091fdafd62d71c0ca5333a0/spring-test-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/6.0.4/8e24ad493887023cf5fac93541c72516f8ed9f6a/spring-core-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.xmlunit/xmlunit-core/2.9.1/e5833662d9a1279a37da3ef6f62a1da29fcd68c4/xmlunit-core-2.9.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.9.2/40aeef2be7b04f96bb91e8b054affc28b7c7c935/junit-platform-engine-1.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/junit/junit/4.13.2/8ac9e16d933b6fb43bc7f576336b8f4d7eb5ba12/junit-4.13.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.1.2/a231e0d844d2721b0fa1b238006d15c6ded6842a/apiguardian-api-1.1.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/6.0.4/c47b65c09a5a6fc41293b6aa981fcbe24a3adcd0/spring-aop-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.aspectj/aspectjweaver/1.9.19/afbffb1210239fbba5cad73093c5b216d515838f/aspectjweaver-1.9.19.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jdbc/6.0.4/97304a02dec542762c19a7b39e1124f1714f7be9/spring-jdbc-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.zaxxer/HikariCP/5.0.1/a74c7f0a37046846e88d54f7cb6ea6d565c65f9c/HikariCP-5.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.persistence/jakarta.persistence-api/3.1.0/66901fa1c373c6aff65c13791cc11da72060a8d6/jakarta.persistence-api-3.1.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.transaction/jakarta.transaction-api/2.0.1/51a520e3fae406abb84e2e1148e6746ce3f80a1a/jakarta.transaction-api-2.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/6.0.4/4fffcbb7eb4f1e9f1a4c9d3ca60098f7c063fc05/spring-context-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-orm/6.0.4/c9958d0879bdc05f7221c0b49d90a1b8825da540/spring-orm-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-commons/3.0.1/a748e9d73fe23bec3a8604c68da74446a887d59/spring-data-commons-3.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/6.0.4/f8a50c2547179328a5f2202591d6341e3cbf1708/spring-tx-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/6.0.4/7d903607ecfcdefccd0d48aea8724632479b3e83/spring-beans-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.annotation/jakarta.annotation-api/2.1.1/48b9bda22b091b1f48b13af03fe36db3be6e1ae3/jakarta.annotation-api-2.1.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/2.0.6/88c40d8b4f33326f19a7d3c0aaf2c7e8721d4953/slf4j-api-2.0.6.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/3.0.2/1c5c71058a0297534d5c5f33a5d125bbbdb6a390/spring-boot-starter-logging-3.0.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.thymeleaf/thymeleaf/3.1.1.RELEASE/374a129dfa5e7d7f1a46eacc4d49e594ca0cf26f/thymeleaf-3.1.1.RELEASE.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.1/f24e8cb1437e05149b7a3049ebd6700f42e664b1/jackson-datatype-jsr310-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-parameter-names/2.14.1/2e05a86dba3d4b05074b6a313c4d5b7ff844c8dd/jackson-module-parameter-names-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.14.1/da194197d187bf24a8699514344ebf0abd7c342a/jackson-datatype-jdk8-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.14.1/268524b9056cae1211b9f1f52560ef19347f4d17/jackson-databind-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.5/14529cbd593571dc9029272ddc9166b5ef113fc2/tomcat-embed-websocket-10.1.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/10.1.5/21417d3ef8189e2af05aae0a765ad9204d7211b5/tomcat-embed-core-10.1.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/10.1.5/c125df13af42a0fc0cd342370449b1276181e2a1/tomcat-embed-el-10.1.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/6.0.4/a908e6d3c46fcd6b58221d8427bbaf284bbbee0c/spring-expression-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-observation/1.10.3/32cc59dc8b5f00fba9fa88b7139898b0f7905db7/micrometer-observation-1.10.3.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/aopalliance/aopalliance/1.0/235ba8b489512805ac13a8f9ea77a1ca5ebe3e8/aopalliance-1.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/19.0/6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9/guava-19.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-params/5.9.2/bc2765afb7b85b583c710dd259a11c6b8c39e912/junit-jupiter-params-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.9.2/fed843581520eac594bc36bb4b0f55e7b947dda9/junit-jupiter-api-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/net.minidev/json-smart/2.4.8/7c62f5f72ab05eb54d40e2abf0360a2fe9ea477f/json-smart-2.4.8.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.activation/jakarta.activation-api/2.1.1/88c774ab863a21fb2fc4219af95379fafe499a31/jakarta.activation-api-2.1.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.12.22/984e536b4f3fb668b21f15b90c1e8704292d4bdd/byte-buddy-1.12.22.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.12.22/9c4127080df12304336ca90c2ef3f8b7d72915c1/byte-buddy-agent-1.12.22.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.vaadin.external.google/android-json/0.0.20131108.vaadin1/fa26d351fe62a6a17f5cda1287c1c6110dec413f/android-json-0.0.20131108.vaadin1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/6.0.4/2d6523d00fc40cdb2c2f409113447940d2c872b5/spring-jcl-6.0.4.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.9.2/6f9f8621d8230cd38aa42e58ccbc0c00569131ce/junit-platform-commons-1.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.2.0/28c11eb91f9b6d8e200631d46e20a7f407f2a046/opentest4j-1.2.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.4.5/28e7dc0b208d6c3f15beefd73976e064b4ecfa9b/logback-classic-1.4.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.19.0/30f4812e43172ecca5041da2cb6b965cc4777c19/log4j-to-slf4j-2.19.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/2.0.6/c4d348977a83a0bfcf42fd6fd1fee6e7904f1a0c/jul-to-slf4j-2.0.6.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.attoparser/attoparser/2.0.6.RELEASE/8f603f22a18d4f7258f8860ccbb68b069f49904a/attoparser-2.0.6.RELEASE.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.unbescape/unbescape/1.1.6.RELEASE/7b90360afb2b860e09e8347112800d12c12b2a13/unbescape-1.1.6.RELEASE.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.14.1/2a6ad504d591a7903ffdec76b5b7252819a2d162/jackson-annotations-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.14.1/7a07bc535ccf0b7f6929c4d0f2ab9b294ef7c4a3/jackson-core-2.14.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/io.micrometer/micrometer-commons/1.10.3/334080a1a6b849d09d3ef96d7b243fc3c16b2e5a/micrometer-commons-1.10.3.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/net.minidev/accessors-smart/2.4.8/6e1bee5a530caba91893604d6ab41d0edcecca9a/accessors-smart-2.4.8.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.4.5/e9bb2ea70f84401314da4300343b0a246c8954da/logback-core-1.4.5.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.19.0/ea1b37f38c327596b216542bc636cfdc0b8036fa/log4j-api-2.19.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.1/a99500cf6eea30535eeac6be73899d048f8d12a8/asm-9.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.h2database/h2/2.1.214/d5c2005c9e3279201e12d4776c948578b16bf8b2/h2-2.1.214.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/4.0.1/7abfa1ee788a8f090dc598c45876ef068731e72b/jaxb-runtime-4.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.5.0.Final/c19307cc11f28f5e2679347e633a3294d865334d/jboss-logging-3.5.0.Final.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.hibernate.common/hibernate-commons-annotations/6.0.2.Final/fa5a14ef3d2e5c3c99b53a4bef756a3268d69187/hibernate-commons-annotations-6.0.2.Final.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.jboss/jandex/2.4.2.Final/1e1c385990b258ff1a24c801e84aebbacf70eb39/jandex-2.4.2.Final.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.5.1/3fe0bed568c62df5e89f4f174c101eab25345b6c/classmate-1.5.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/jakarta.inject/jakarta.inject-api/2.0.0/46fc8560b6fd17b78396d88f39c1a730457671f0/jakarta.inject-api-2.0.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.antlr/antlr4-runtime/4.10.1/10839f875928f59c622d675091d51a43ea0dc5f7/antlr4-runtime-4.10.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-engine/5.9.2/572f7a553b53f83ee59cc045ce1c3772864ab76c/junit-jupiter-engine-5.9.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/3.2/7fadf57620c8b8abdf7519533e5527367cb51f09/objenesis-3.2.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-core/4.0.1/b4707bb31dfcf54ae424b930741f0cd62d672af9/jaxb-core-4.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.eclipse.angus/angus-activation/1.0.0/f0ceddd49f92109fbfad9125e958f5bfd3f2aa1/angus-activation-1.0.0.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/txw2/4.0.1/797720dfe2e15504f6014fb82eb873051a653c75/txw2-4.0.1.jar:/Users/hyoozo/.gradle/caches/modules-2/files-2.1/com.sun.istack/istack-commons-runtime/4.1.1/9b3769c76235bc283b060da4fae2318c6d53f07e/istack-commons-runtime-4.1.1.jar com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 jpabook.jpashop.service.MemberServiceTest 01:50:34.324 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither @ContextConfiguration nor @ContextHierarchy found for test class [MemberServiceTest]: using SpringBootContextLoader 01:50:34.335 [main] DEBUG org.springframework.test.context.support .AbstractContextLoader - Could not detect default resource locations for test class [jpabook.jpashop.service.MemberServiceTest]: no resource found for suffixes {-context.xml, Context.groovy}. 01:50:34.343 [main] INFO org.springframework.test.context.support .AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [jpabook.jpashop.service.MemberServiceTest]: MemberServiceTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. 01:50:34.451 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using ContextCustomizers for test class [MemberServiceTest]: [DisableObservabilityContextCustomizer, PropertyMappingContextCustomizer, Customizer, ExcludeFilterContextCustomizer, DuplicateJsonObjectContextCustomizer, MockitoContextCustomizer, TestRestTemplateContextCustomizer] 01:50:35.064 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [/Users/hyoozo/Documents/study/jpashop/out/production/classes/jpabook/jpashop/JpashopApplication.class] 01:50:35.067 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found @SpringBootConfiguration jpabook.jpashop.JpashopApplication for test class jpabook.jpashop.service.MemberServiceTest 01:50:35.509 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners for test class [MemberServiceTest]: [ServletTestExecutionListener, DirtiesContextBeforeModesTestExecutionListener, ApplicationEventsTestExecutionListener, MockitoTestExecutionListener, DependencyInjectionTestExecutionListener, DirtiesContextTestExecutionListener, TransactionalTestExecutionListener, SqlScriptsTestExecutionListener, EventPublishingTestExecutionListener, RestDocsTestExecutionListener, MockRestServiceServerResetTestExecutionListener, MockMvcPrintOnlyOnFailureTestExecutionListener, WebDriverTestExecutionListener, MockWebServiceServerTestExecutionListener, ResetMocksTestExecutionListener] 01:50:35.516 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.522 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.529 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.530 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.530 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.530 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.555 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.558 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.560 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.561 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.562 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.562 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.571 [main] DEBUG org.springframework.test.context.support .AbstractDirtiesContextTestExecutionListener - Before test class: class [MemberServiceTest], class annotated with @DirtiesContext [false] with mode [null] 01:50:35.573 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [jpabook.jpashop.service.MemberServiceTest] 01:50:35.574 [main] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [jpabook.jpashop.service.MemberServiceTest] . ____ _ /\\ / ___'_ __ ( _)_ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.0.2) 2023-02-21T01:50:37.029+09:00 INFO 19303 --- [ main] j.jpashop.service.MemberServiceTest : Starting MemberServiceTest using Java 17.0.5 with PID 19303 (started by hyoozo in /Users/hyoozo/Documents/study/jpashop) 2023-02-21T01:50:37.037+09:00 INFO 19303 --- [ main] j.jpashop.service.MemberServiceTest : No active profile set, falling back to 1 default profile: "default" 2023-02-21T01:50:38.911+09:00 INFO 19303 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2023-02-21T01:50:39.024+09:00 INFO 19303 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 44 ms. Found 0 JPA repository interfaces. 2023-02-21T01:50:40.264+09:00 INFO 19303 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2023-02-21T01:50:40.752+09:00 INFO 19303 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37 user=SA 2023-02-21T01:50:40.754+09:00 INFO 19303 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2023-02-21T01:50:40.845+09:00 INFO 19303 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2023-02-21T01:50:40.970+09:00 INFO 19303 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.6.Final 2023-02-21T01:50:41.440+09:00 WARN 19303 --- [ main] org.hibernate.orm.deprecation : HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead 2023-02-21T01:50:41.773+09:00 INFO 19303 --- [ main] SQL dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2023-02-21T01:50:42.396+09:00 INFO 19303 --- [ main] p6spy : 1676911842396|16|statement|connection 2|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select from INFORMATION_SCHEMA.SEQUENCES|select from INFORMATION_SCHEMA.SEQUENCES 2023-02-21T01:50:43.895+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists category cascade 2023-02-21T01:50:43.897+09:00 INFO 19303 --- [ main] p6spy : 1676911843897|1|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists category cascade |drop table if exists category cascade 2023-02-21T01:50:43.898+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists category_item cascade 2023-02-21T01:50:43.899+09:00 INFO 19303 --- [ main] p6spy : 1676911843899|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists category_item cascade |drop table if exists category_item cascade 2023-02-21T01:50:43.899+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists delivery cascade 2023-02-21T01:50:43.899+09:00 INFO 19303 --- [ main] p6spy : 1676911843899|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists delivery cascade |drop table if exists delivery cascade 2023-02-21T01:50:43.900+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists item cascade 2023-02-21T01:50:43.901+09:00 INFO 19303 --- [ main] p6spy : 1676911843900|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists item cascade |drop table if exists item cascade 2023-02-21T01:50:43.901+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists member cascade 2023-02-21T01:50:43.902+09:00 INFO 19303 --- [ main] p6spy : 1676911843902|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists member cascade |drop table if exists member cascade 2023-02-21T01:50:43.902+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists order_item cascade 2023-02-21T01:50:43.902+09:00 INFO 19303 --- [ main] p6spy : 1676911843902|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists order_item cascade |drop table if exists order_item cascade 2023-02-21T01:50:43.903+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop table if exists orders cascade 2023-02-21T01:50:43.903+09:00 INFO 19303 --- [ main] p6spy : 1676911843903|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists orders cascade |drop table if exists orders cascade 2023-02-21T01:50:43.904+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists category_seq 2023-02-21T01:50:43.905+09:00 INFO 19303 --- [ main] p6spy : 1676911843905|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists category_seq|drop sequence if exists category_seq 2023-02-21T01:50:43.905+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists delivery_seq 2023-02-21T01:50:43.906+09:00 INFO 19303 --- [ main] p6spy : 1676911843906|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists delivery_seq|drop sequence if exists delivery_seq 2023-02-21T01:50:43.907+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists item_seq 2023-02-21T01:50:43.907+09:00 INFO 19303 --- [ main] p6spy : 1676911843907|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists item_seq|drop sequence if exists item_seq 2023-02-21T01:50:43.908+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists member_seq 2023-02-21T01:50:43.908+09:00 INFO 19303 --- [ main] p6spy : 1676911843908|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists member_seq|drop sequence if exists member_seq 2023-02-21T01:50:43.909+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists order_item_seq 2023-02-21T01:50:43.910+09:00 INFO 19303 --- [ main] p6spy : 1676911843910|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists order_item_seq|drop sequence if exists order_item_seq 2023-02-21T01:50:43.910+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : drop sequence if exists orders_seq 2023-02-21T01:50:43.911+09:00 INFO 19303 --- [ main] p6spy : 1676911843911|0|statement|connection 3|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists orders_seq|drop sequence if exists orders_seq 2023-02-21T01:50:43.921+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence category_seq start with 1 increment by 50 2023-02-21T01:50:43.924+09:00 INFO 19303 --- [ main] p6spy : 1676911843923|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence category_seq start with 1 increment by 50|create sequence category_seq start with 1 increment by 50 2023-02-21T01:50:43.924+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence delivery_seq start with 1 increment by 50 2023-02-21T01:50:43.925+09:00 INFO 19303 --- [ main] p6spy : 1676911843925|0|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence delivery_seq start with 1 increment by 50|create sequence delivery_seq start with 1 increment by 50 2023-02-21T01:50:43.925+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence item_seq start with 1 increment by 50 2023-02-21T01:50:43.926+09:00 INFO 19303 --- [ main] p6spy : 1676911843926|0|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence item_seq start with 1 increment by 50|create sequence item_seq start with 1 increment by 50 2023-02-21T01:50:43.926+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence member_seq start with 1 increment by 50 2023-02-21T01:50:43.927+09:00 INFO 19303 --- [ main] p6spy : 1676911843926|0|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence member_seq start with 1 increment by 50|create sequence member_seq start with 1 increment by 50 2023-02-21T01:50:43.927+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence order_item_seq start with 1 increment by 50 2023-02-21T01:50:43.928+09:00 INFO 19303 --- [ main] p6spy : 1676911843928|0|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence order_item_seq start with 1 increment by 50|create sequence order_item_seq start with 1 increment by 50 2023-02-21T01:50:43.930+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create sequence orders_seq start with 1 increment by 50 2023-02-21T01:50:43.933+09:00 INFO 19303 --- [ main] p6spy : 1676911843933|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create sequence orders_seq start with 1 increment by 50|create sequence orders_seq start with 1 increment by 50 2023-02-21T01:50:43.937+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table category (category_id bigint not null, name varchar(255), parent_id bigint, primary key (category_id)) 2023-02-21T01:50:43.946+09:00 INFO 19303 --- [ main] p6spy : 1676911843946|8|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table category (category_id bigint not null, name varchar(255), parent_id bigint, primary key (category_id))|create table category (category_id bigint not null, name varchar(255), parent_id bigint, primary key (category_id)) 2023-02-21T01:50:43.947+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table category_item (category_id bigint not null, item_id bigint not null) 2023-02-21T01:50:43.949+09:00 INFO 19303 --- [ main] p6spy : 1676911843949|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table category_item (category_id bigint not null, item_id bigint not null)|create table category_item (category_id bigint not null, item_id bigint not null) 2023-02-21T01:50:43.949+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table delivery (delivery_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), status varchar(255), primary key (delivery_id)) 2023-02-21T01:50:43.954+09:00 INFO 19303 --- [ main] p6spy : 1676911843953|4|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table delivery (delivery_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), status varchar(255), primary key (delivery_id))|create table delivery (delivery_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), status varchar(255), primary key (delivery_id)) 2023-02-21T01:50:43.954+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table item (dtype varchar(31) not null, item_id bigint not null, name varchar(255), price integer not null, stock_quantity integer not null, artist varchar(255), etc varchar(255), author varchar(255), isbn varchar(255), actor varchar(255), director varchar(255), primary key (item_id)) 2023-02-21T01:50:43.957+09:00 INFO 19303 --- [ main] p6spy : 1676911843957|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table item (dtype varchar(31) not null, item_id bigint not null, name varchar(255), price integer not null, stock_quantity integer not null, artist varchar(255), etc varchar(255), author varchar(255), isbn varchar(255), actor varchar(255), director varchar(255), primary key (item_id))|create table item (dtype varchar(31) not null, item_id bigint not null, name varchar(255), price integer not null, stock_quantity integer not null, artist varchar(255), etc varchar(255), author varchar(255), isbn varchar(255), actor varchar(255), director varchar(255), primary key (item_id)) 2023-02-21T01:50:43.957+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table member (member_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), name varchar(255), primary key (member_id)) 2023-02-21T01:50:43.960+09:00 INFO 19303 --- [ main] p6spy : 1676911843959|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table member (member_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), name varchar(255), primary key (member_id))|create table member (member_id bigint not null, city varchar(255), street varchar(255), zipcode varchar(255), name varchar(255), primary key (member_id)) 2023-02-21T01:50:43.960+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table order_item (order_item_id bigint not null, count integer not null, order_price integer not null, item_id bigint, order_id bigint, primary key (order_item_id)) 2023-02-21T01:50:43.962+09:00 INFO 19303 --- [ main] p6spy : 1676911843962|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table order_item (order_item_id bigint not null, count integer not null, order_price integer not null, item_id bigint, order_id bigint, primary key (order_item_id))|create table order_item (order_item_id bigint not null, count integer not null, order_price integer not null, item_id bigint, order_id bigint, primary key (order_item_id)) 2023-02-21T01:50:43.962+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : create table orders (order_id bigint not null, order_date timestamp(6), status varchar(255), delivery_id bigint, member_id bigint, primary key (order_id)) 2023-02-21T01:50:43.964+09:00 INFO 19303 --- [ main] p6spy : 1676911843964|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|create table orders (order_id bigint not null, order_date timestamp(6), status varchar(255), delivery_id bigint, member_id bigint, primary key (order_id))|create table orders (order_id bigint not null, order_date timestamp(6), status varchar(255), delivery_id bigint, member_id bigint, primary key (order_id)) 2023-02-21T01:50:43.965+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists category add constraint FK2y94svpmqttx80mshyny85wqr foreign key (parent_id) references category 2023-02-21T01:50:43.986+09:00 INFO 19303 --- [ main] p6spy : 1676911843986|20|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists category add constraint FK2y94svpmqttx80mshyny85wqr foreign key (parent_id) references category|alter table if exists category add constraint FK2y94svpmqttx80mshyny85wqr foreign key (parent_id) references category 2023-02-21T01:50:43.986+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists category_item add constraint FKu8b4lwqutcdq3363gf6mlujq foreign key (item_id) references item 2023-02-21T01:50:43.989+09:00 INFO 19303 --- [ main] p6spy : 1676911843989|3|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists category_item add constraint FKu8b4lwqutcdq3363gf6mlujq foreign key (item_id) references item|alter table if exists category_item add constraint FKu8b4lwqutcdq3363gf6mlujq foreign key (item_id) references item 2023-02-21T01:50:43.990+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists category_item add constraint FKcq2n0opf5shyh84ex1fhukcbh foreign key (category_id) references category 2023-02-21T01:50:43.992+09:00 INFO 19303 --- [ main] p6spy : 1676911843992|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists category_item add constraint FKcq2n0opf5shyh84ex1fhukcbh foreign key (category_id) references category|alter table if exists category_item add constraint FKcq2n0opf5shyh84ex1fhukcbh foreign key (category_id) references category 2023-02-21T01:50:43.992+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists order_item add constraint FKija6hjjiit8dprnmvtvgdp6ru foreign key (item_id) references item 2023-02-21T01:50:43.995+09:00 INFO 19303 --- [ main] p6spy : 1676911843994|1|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists order_item add constraint FKija6hjjiit8dprnmvtvgdp6ru foreign key (item_id) references item|alter table if exists order_item add constraint FKija6hjjiit8dprnmvtvgdp6ru foreign key (item_id) references item 2023-02-21T01:50:43.995+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists order_item add constraint FKt4dc2r9nbvbujrljv3e23iibt foreign key (order_id) references orders 2023-02-21T01:50:43.997+09:00 INFO 19303 --- [ main] p6spy : 1676911843997|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists order_item add constraint FKt4dc2r9nbvbujrljv3e23iibt foreign key (order_id) references orders|alter table if exists order_item add constraint FKt4dc2r9nbvbujrljv3e23iibt foreign key (order_id) references orders 2023-02-21T01:50:43.998+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists orders add constraint FKtkrur7wg4d8ax0pwgo0vmy20c foreign key (delivery_id) references delivery 2023-02-21T01:50:44.000+09:00 INFO 19303 --- [ main] p6spy : 1676911844000|2|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists orders add constraint FKtkrur7wg4d8ax0pwgo0vmy20c foreign key (delivery_id) references delivery|alter table if exists orders add constraint FKtkrur7wg4d8ax0pwgo0vmy20c foreign key (delivery_id) references delivery 2023-02-21T01:50:44.000+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : alter table if exists orders add constraint FKpktxwhj3x9m4gth5ff6bkqgeb foreign key (member_id) references member 2023-02-21T01:50:44.005+09:00 INFO 19303 --- [ main] p6spy : 1676911844005|4|statement|connection 4|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|alter table if exists orders add constraint FKpktxwhj3x9m4gth5ff6bkqgeb foreign key (member_id) references member|alter table if exists orders add constraint FKpktxwhj3x9m4gth5ff6bkqgeb foreign key (member_id) references member 2023-02-21T01:50:44.009+09:00 INFO 19303 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2023-02-21T01:50:44.026+09:00 INFO 19303 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2023-02-21T01:50:44.445+09:00 WARN 19303 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2023-02-21T01:50:44.884+09:00 INFO 19303 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html] 2023-02-21T01:50:45.303+09:00 INFO 19303 --- [ main] j.jpashop.service.MemberServiceTest : Started MemberServiceTest in 9.615 seconds (process running for 13.008) 2023-02-21T01:50:46.493+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=? 2023-02-21T01:50:46.504+09:00 INFO 19303 --- [ main] p6spy : 1676911846504|0|statement|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name='kim' 2023-02-21T01:50:46.529+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select next value for member_seq 2023-02-21T01:50:46.539+09:00 INFO 19303 --- [ main] p6spy : 1676911846539|2|statement|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select next value for member_seq|select next value for member_seq 2023-02-21T01:50:46.611+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : insert into member (city, street, zipcode, name, member_id) values (?, ?, ?, ?, ?) 2023-02-21T01:50:46.614+09:00 INFO 19303 --- [ main] p6spy : 1676911846614|1|statement|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|insert into member (city, street, zipcode, name, member_id) values (?, ?, ?, ?, ?)|insert into member (city, street, zipcode, name, member_id) values (NULL, NULL, NULL, 'kim', 1) 2023-02-21T01:50:46.624+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=? 2023-02-21T01:50:46.626+09:00 INFO 19303 --- [ main] p6spy : 1676911846625|0|statement|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name='kim' 2023-02-21T01:50:46.650+09:00 INFO 19303 --- [ main] p6spy : 1676911846649|1|rollback|connection 5|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|| 2023-02-21T01:50:46.673+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=? 2023-02-21T01:50:46.675+09:00 INFO 19303 --- [ main] p6spy : 1676911846675|0|statement|connection 6|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name=?|select m1_0.member_id,m1_0.city,m1_0.street,m1_0.zipcode,m1_0.name from member m1_0 where m1_0.name='kim' 2023-02-21T01:50:46.676+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : select next value for member_seq 2023-02-21T01:50:46.676+09:00 INFO 19303 --- [ main] p6spy : 1676911846676|0|statement|connection 6|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|select next value for member_seq|select next value for member_seq 2023-02-21T01:50:46.696+09:00 DEBUG 19303 --- [ main] org.hibernate.SQL : insert into member (city, street, zipcode, name, member_id) values (?, ?, ?, ?, ?) 2023-02-21T01:50:46.697+09:00 INFO 19303 --- [ main] p6spy : 1676911846697|0|statement|connection 6|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|insert into member (city, street, zipcode, name, member_id) values (?, ?, ?, ?, ?)|insert into member (city, street, zipcode, name, member_id) values (NULL, NULL, NULL, 'kim', 2) 2023-02-21T01:50:46.699+09:00 INFO 19303 --- [ main] p6spy : 1676911846699|0|commit|connection 6|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|| 2023-02-21T01:50:46.726+09:00 INFO 19303 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2023-02-21T01:50:46.729+09:00 INFO 19303 --- [ionShutdownHook] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down' 2023-02-21T01:50:46.730+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists category cascade 2023-02-21T01:50:46.745+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846745|13|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists category cascade |drop table if exists category cascade 2023-02-21T01:50:46.745+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists category_item cascade 2023-02-21T01:50:46.752+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846752|7|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists category_item cascade |drop table if exists category_item cascade 2023-02-21T01:50:46.753+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists delivery cascade 2023-02-21T01:50:46.759+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846759|5|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists delivery cascade |drop table if exists delivery cascade 2023-02-21T01:50:46.759+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists item cascade 2023-02-21T01:50:46.761+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846760|1|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists item cascade |drop table if exists item cascade 2023-02-21T01:50:46.761+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists member cascade 2023-02-21T01:50:46.764+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846764|2|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists member cascade |drop table if exists member cascade 2023-02-21T01:50:46.764+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists order_item cascade 2023-02-21T01:50:46.769+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846769|4|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists order_item cascade |drop table if exists order_item cascade 2023-02-21T01:50:46.769+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop table if exists orders cascade 2023-02-21T01:50:46.771+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846771|1|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop table if exists orders cascade |drop table if exists orders cascade 2023-02-21T01:50:46.772+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists category_seq 2023-02-21T01:50:46.773+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846773|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists category_seq|drop sequence if exists category_seq 2023-02-21T01:50:46.773+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists delivery_seq 2023-02-21T01:50:46.774+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846774|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists delivery_seq|drop sequence if exists delivery_seq 2023-02-21T01:50:46.774+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists item_seq 2023-02-21T01:50:46.775+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846775|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists item_seq|drop sequence if exists item_seq 2023-02-21T01:50:46.775+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists member_seq 2023-02-21T01:50:46.776+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846776|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists member_seq|drop sequence if exists member_seq 2023-02-21T01:50:46.776+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists order_item_seq 2023-02-21T01:50:46.777+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846777|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists order_item_seq|drop sequence if exists order_item_seq 2023-02-21T01:50:46.777+09:00 DEBUG 19303 --- [ionShutdownHook] org.hibernate.SQL : drop sequence if exists orders_seq 2023-02-21T01:50:46.778+09:00 INFO 19303 --- [ionShutdownHook] p6spy : 1676911846778|0|statement|connection 7|url jdbc:h2:mem:a8d68834-99ee-4507-a769-b266691c8e37|drop sequence if exists orders_seq|drop sequence if exists orders_seq 2023-02-21T01:50:46.783+09:00 INFO 19303 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2023-02-21T01:50:46.788+09:00 INFO 19303 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. Process finished with exit code 0

  • spring-boot
  • 웹앱
  • JPA
  • 웹앱
  • spring
  • jpa
  • java
114tla 댓글 1 좋아요 0 조회수 730

퀴즈 11 질문입니다 관련

미해결

나도코딩의 자바 기본편 - 풀코스 (20시간)

Throw 로 생성을 해주니 클래스 부분에 스태틱을 포함하든가 메인 영역에 스태틱을 지우라고 오류가 뜹니다. 선생님 코드에는 이상이 없는 것 같은데 궁금합니다! 이렇게 클래스에 스태틱을 추가하면 오류가 사라집니다.

  • 객체지향
  • java
  • oop
댓글 1 좋아요 0 조회수 355

PartialType과 OmitType 동시 적용

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

포트폴리오 과정의 'N:M 등록 및 조회/회원가입'을 처리하는 중 질문할 것이 나와 질문을 드립니다. User의 생성부분을 구현하기 위해 CreateUserInput 타입을 만들었고 해당 부분에서 유저 아이디, 패스워드, 이메일 등을 기입하도록 하였습니다. @InputType() export class CreateUserInput { @Field(() => String) loginId: string; @Field(() => String) @MinLength(8) password: string; @Field(() => String) name: string; @Field(() => String) address: string; @Field(() => String) @IsPhoneNumber('KR') phone: string; @Field(() => String) @IsEmail() @Transform(({ value }) => value.toLowerCase()) email: string; } 그리고 User의 수정 부분을 구현하기 위해 UpdateUserInput 타입을 만들었습니다. 단순히 OmitType으로 CreateUserInput 부분을 넘겨 만들었습니다만, API 동작에서 패스워드 부분을 넘기지 않으면 필수 항목을 입력하지 않았다고 수정이 되지 않았습니다. @InputType() export class UpdateUserInput extends OmitType(CreateUserInput, ['loginId', 'email'], InputType) { } 그래서 그냥 PartialType까지 상속하고 싶었습니다만 타입스크립트도 다중 상속을 지원하지 않는지 OmitType과 PartialType을 함께 쓸 수 없었습니다. 이러면 그냥 CreateUserInput처럼 전부 구현할 수 밖에 없나요? API 부분에서 넘기지 않은 부분은 그냥 그대로 냅두는 것을 목적으로 합니다.

  • node.js
  • rest-api
  • express
  • tdd
  • docker
  • javascript
  • nestjs
  • nodejs
  • NestJS
ZZAMBA 댓글 1 좋아요 0 조회수 607

spring initializr를 설치해도 뜨질 않습니다.

미해결

[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발

inteillj communiuty로 사용하면 spring initializr을 직접 다운 받아야 한다고 해서 강의랑 똑같이 설정하고 다운받았는데도 new project에 spring initializr가 안뜹니다...

  • spring-boot
  • rest-api
댓글 1 좋아요 0 조회수 470

10분 18초에 getTotalPrice() 함수에서 질문이 있습니다.

해결됨

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] getTotalPrice() 메서드가 OrderItem 클래스 안에 있으니까 orderPrice 변수와 count변수를 직접 건들수 있는데 왜 orderPrice*count가 아닌 getOrderPrice()* getCount()를 쓰는지 궁금합니다..

  • java
  • spring-boot
  • 웹앱
  • spring
  • jpa
  • 웹앱
  • JPA
최재영 댓글 1 좋아요 1 조회수 413

인기 태그

인프런 TOP Writers

주간 인기글