Skip to content

[Chapter 08] EntityManager #119

Discussion options

You must be logged in to vote

네 맞습니다. 책에 나오는 예제로 간단하게 테스트해 볼 수 있습니다.

XxxApplication.java

@Slf4j
@SpringBootApplication
public class XxxApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(CorockApplication.class, args);
        HotelService hotelService = ctx.getBean(HotelService.class);

        HotelCreateRequest request = new HotelCreateRequest();
        request.setName("The LINE LA");
        request.setAddress("3515 Wilshire Blvd, Los Angeles, CA 90010");
        request.setPhoneNumber("+12133817411");
        request.setRoomCount(8);

        hotelService.createHotel(request);
    }

}

HotelService.java

@Service
@RequiredArgsConstructor
p…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BvrPark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chapter08 데이터 영속성
2 participants