묻고 답해요
167만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
재질문 드립니다 죄송합니다
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. EntityA 1:N EntityBEntityB 1:N EntityC이런식으로 있을 때 ,EntityA 가 EntityB를 @oneToMany로 가지고있고,EntityB 가 EntityC를 @oneToMany로 가지고 있습니다. 배치사이즈 옵션을 넣고select a from EntityA a 했을때 , EntityA의 갯수만큼 EntityB에 in절로 EntityA의 키값을 넣어서 @oneToMany를 한번에 끌고왔다고 했을 때 ,EntityB안에있는 EntityC를 또 EntityB의 갯수만큼 EntityC에 in절로 EntityB의 키값을 넣어서 한번에 끌고 올 수 있는 방법이 있는지 궁금했습니다. 다중 페치조인 안되는걸 알지만 예를 들어서 이런걸 원한다고 생각하시면 될 것 같습니다select a from EntityA a join fetch EnitityB(List) b join fetch b.EntityC(List)이런식으로 컬럼 갯수가 일대다 일대다로 기하급수적으로 증가하는 경우인데배치사이즈를 사용하여 select a from EntityA a 를 했을 땐 a.EntityB 에 접근할때 당연히 in 절로 가져와주지만 EntityB의 일대다인 EntityC 를 조회 할 땐 N+1이 다시 터집니다엮여있는 모든 연관관계들을 IN절로 태우고 싶은데 방법이 없을까요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
h2 데이터베이스 테이블 생성이 안됩니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]2023-09-06T15:55:42.478+09:00 INFO 7976 --- [ restartedMain] jpabooks.jpashop.JpashopApplication : Starting JpashopApplication using Java 17.0.7 with PID 7976 (D:\SelfStudySpring\jpashop\out\production\classes started by sjj in D:\SelfStudySpring\jpashop)2023-09-06T15:55:42.483+09:00 INFO 7976 --- [ restartedMain] jpabooks.jpashop.JpashopApplication : No active profile set, falling back to 1 default profile: "default"2023-09-06T15:55:42.569+09:00 INFO 7976 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable2023-09-06T15:55:42.570+09:00 INFO 7976 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'2023-09-06T15:55:43.452+09:00 INFO 7976 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.2023-09-06T15:55:43.482+09:00 INFO 7976 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 20 ms. Found 0 JPA repository interfaces.2023-09-06T15:55:44.366+09:00 INFO 7976 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8086 (http)2023-09-06T15:55:44.380+09:00 INFO 7976 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]2023-09-06T15:55:44.380+09:00 INFO 7976 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.12]2023-09-06T15:55:44.496+09:00 INFO 7976 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext2023-09-06T15:55:44.498+09:00 INFO 7976 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1926 ms2023-09-06T15:55:44.655+09:00 INFO 7976 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...2023-09-06T15:55:44.856+09:00 INFO 7976 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b user=SA2023-09-06T15:55:44.858+09:00 INFO 7976 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.2023-09-06T15:55:44.873+09:00 INFO 7976 --- [ restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b'2023-09-06T15:55:45.058+09:00 INFO 7976 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]2023-09-06T15:55:45.138+09:00 INFO 7976 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final2023-09-06T15:55:45.141+09:00 INFO 7976 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer2023-09-06T15:55:45.313+09:00 INFO 7976 --- [ restartedMain] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy2023-09-06T15:55:45.520+09:00 INFO 7976 --- [ restartedMain] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer2023-09-06T15:55:45.966+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983345966 | took 9ms | statement | connection 2| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504bselect * from INFORMATION_SCHEMA.SEQUENCESselect * from INFORMATION_SCHEMA.SEQUENCES;2023-09-06T15:55:45.983+09:00 INFO 7976 --- [ restartedMain] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy2023-09-06T15:55:46.832+09:00 INFO 7976 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]2023-09-06T15:55:46.853+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop table if exists category cascade 2023-09-06T15:55:46.854+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346854 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop table if exists category cascade drop table if exists category cascade ;2023-09-06T15:55:46.855+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop table if exists category_item cascade 2023-09-06T15:55:46.855+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346855 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop table if exists category_item cascade drop table if exists category_item cascade ;2023-09-06T15:55:46.855+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop table if exists delivery cascade 2023-09-06T15:55:46.855+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346855 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop table if exists delivery cascade drop table if exists delivery cascade ;2023-09-06T15:55:46.855+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop table if exists item cascade 2023-09-06T15:55:46.855+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346855 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop table if exists item cascade drop table if exists item cascade ;2023-09-06T15:55:46.855+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop table if exists member cascade 2023-09-06T15:55:46.855+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346855 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop table if exists member cascade drop table if exists member cascade ;2023-09-06T15:55:46.856+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop table if exists order_item cascade 2023-09-06T15:55:46.856+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346856 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop table if exists order_item cascade drop table if exists order_item cascade ;2023-09-06T15:55:46.856+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop table if exists orders cascade 2023-09-06T15:55:46.856+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346856 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop table if exists orders cascade drop table if exists orders cascade ;2023-09-06T15:55:46.856+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop sequence if exists category_seq2023-09-06T15:55:46.857+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346857 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop sequence if exists category_seq drop sequence if exists category_seq;2023-09-06T15:55:46.857+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop sequence if exists delivery_seq2023-09-06T15:55:46.857+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346857 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop sequence if exists delivery_seq drop sequence if exists delivery_seq;2023-09-06T15:55:46.857+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop sequence if exists item_seq2023-09-06T15:55:46.857+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346857 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop sequence if exists item_seq drop sequence if exists item_seq;2023-09-06T15:55:46.858+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop sequence if exists member_seq2023-09-06T15:55:46.858+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346858 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop sequence if exists member_seq drop sequence if exists member_seq;2023-09-06T15:55:46.858+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop sequence if exists order_item_seq2023-09-06T15:55:46.858+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346858 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop sequence if exists order_item_seq drop sequence if exists order_item_seq;2023-09-06T15:55:46.858+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : drop sequence if exists orders_seq2023-09-06T15:55:46.858+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346858 | took 0ms | statement | connection 3| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b drop sequence if exists orders_seq drop sequence if exists orders_seq;2023-09-06T15:55:46.863+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create sequence category_seq start with 1 increment by 502023-09-06T15:55:46.865+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346865 | took 1ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create sequence category_seq start with 1 increment by 50 create sequence category_seq start with 1 increment by 50;2023-09-06T15:55:46.865+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create sequence delivery_seq start with 1 increment by 502023-09-06T15:55:46.865+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346865 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create sequence delivery_seq start with 1 increment by 50 create sequence delivery_seq start with 1 increment by 50;2023-09-06T15:55:46.865+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create sequence item_seq start with 1 increment by 502023-09-06T15:55:46.866+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346866 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create sequence item_seq start with 1 increment by 50 create sequence item_seq start with 1 increment by 50;2023-09-06T15:55:46.866+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create sequence member_seq start with 1 increment by 502023-09-06T15:55:46.866+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346866 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create sequence member_seq start with 1 increment by 50 create sequence member_seq start with 1 increment by 50;2023-09-06T15:55:46.866+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create sequence order_item_seq start with 1 increment by 502023-09-06T15:55:46.867+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346867 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create sequence order_item_seq start with 1 increment by 50 create sequence order_item_seq start with 1 increment by 50;2023-09-06T15:55:46.867+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create sequence orders_seq start with 1 increment by 502023-09-06T15:55:46.867+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346867 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create sequence orders_seq start with 1 increment by 50 create sequence orders_seq start with 1 increment by 50;2023-09-06T15:55:46.869+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create table category ( category_id bigint not null, parent_id bigint, name varchar(255), primary key (category_id) )2023-09-06T15:55:46.873+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346873 | took 3ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create table category ( category_id bigint not null, parent_id bigint, name varchar(255), primary key (category_id) ) create table category ( category_id bigint not null, parent_id bigint, name varchar(255), primary key (category_id) );2023-09-06T15:55:46.874+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create table category_item ( category_id bigint not null, item_id bigint not null )2023-09-06T15:55:46.874+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346874 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b 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-09-06T15:55:46.874+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create table delivery ( delivery_id bigint not null, city varchar(255), status varchar(255) check (status in ('READY','COMP')), street varchar(255), zipcode varchar(255), primary key (delivery_id) )2023-09-06T15:55:46.876+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346876 | took 1ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create table delivery ( delivery_id bigint not null, city varchar(255), status varchar(255) check (status in ('READY','COMP')), street varchar(255), zipcode varchar(255), primary key (delivery_id) ) create table delivery ( delivery_id bigint not null, city varchar(255), status varchar(255) check (status in ('READY','COMP')), street varchar(255), zipcode varchar(255), primary key (delivery_id) );2023-09-06T15:55:46.877+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create table item ( price integer not null, stock_quantity integer not null, item_id bigint not null, dtype varchar(31) not null, actor varchar(255), artist varchar(255), author varchar(255), director varchar(255), etc varchar(255), isbn varchar(255), name varchar(255), primary key (item_id) )2023-09-06T15:55:46.878+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346878 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create table item ( price integer not null, stock_quantity integer not null, item_id bigint not null, dtype varchar(31) not null, actor varchar(255), artist varchar(255), author varchar(255), director varchar(255), etc varchar(255), isbn varchar(255), name varchar(255), primary key (item_id) ) create table item ( price integer not null, stock_quantity integer not null, item_id bigint not null, dtype varchar(31) not null, actor varchar(255), artist varchar(255), author varchar(255), director varchar(255), etc varchar(255), isbn varchar(255), name varchar(255), primary key (item_id) );2023-09-06T15:55:46.878+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create table member ( member_id bigint not null, city varchar(255), name varchar(255), street varchar(255), zipcode varchar(255), primary key (member_id) )2023-09-06T15:55:46.879+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346879 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create table member ( member_id bigint not null, city varchar(255), name varchar(255), street varchar(255), zipcode varchar(255), primary key (member_id) ) create table member ( member_id bigint not null, city varchar(255), name varchar(255), street varchar(255), zipcode varchar(255), primary key (member_id) );2023-09-06T15:55:46.879+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create table order_item ( count integer not null, order_price integer not null, item_id bigint, order_id bigint, order_item_id bigint not null, primary key (order_item_id) )2023-09-06T15:55:46.880+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346880 | took 0ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create table order_item ( count integer not null, order_price integer not null, item_id bigint, order_id bigint, order_item_id bigint not null, primary key (order_item_id) ) create table order_item ( count integer not null, order_price integer not null, item_id bigint, order_id bigint, order_item_id bigint not null, primary key (order_item_id) );2023-09-06T15:55:46.882+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : create table orders ( status tinyint check (status between 0 and 1), delivery_id bigint unique, member_id bigint, order_date timestamp(6), order_id bigint not null, primary key (order_id) )2023-09-06T15:55:46.885+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346885 | took 2ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b create table orders ( status tinyint check (status between 0 and 1), delivery_id bigint unique, member_id bigint, order_date timestamp(6), order_id bigint not null, primary key (order_id) ) create table orders ( status tinyint check (status between 0 and 1), delivery_id bigint unique, member_id bigint, order_date timestamp(6), order_id bigint not null, primary key (order_id) );2023-09-06T15:55:46.886+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : alter table if exists category add constraint FK2y94svpmqttx80mshyny85wqr foreign key (parent_id) references category2023-09-06T15:55:46.892+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346892 | took 6ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b 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-09-06T15:55:46.892+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : alter table if exists category_item add constraint FKu8b4lwqutcdq3363gf6mlujq foreign key (item_id) references item2023-09-06T15:55:46.894+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346894 | took 1ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b 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-09-06T15:55:46.894+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : alter table if exists category_item add constraint FKcq2n0opf5shyh84ex1fhukcbh foreign key (category_id) references category2023-09-06T15:55:46.895+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346895 | took 1ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b 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-09-06T15:55:46.895+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : alter table if exists order_item add constraint FKija6hjjiit8dprnmvtvgdp6ru foreign key (item_id) references item2023-09-06T15:55:46.897+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346897 | took 1ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b 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-09-06T15:55:46.897+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : alter table if exists order_item add constraint FKt4dc2r9nbvbujrljv3e23iibt foreign key (order_id) references orders2023-09-06T15:55:46.898+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346898 | took 1ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b 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-09-06T15:55:46.898+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : alter table if exists orders add constraint FKtkrur7wg4d8ax0pwgo0vmy20c foreign key (delivery_id) references delivery2023-09-06T15:55:46.899+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346899 | took 1ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b 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-09-06T15:55:46.899+09:00 DEBUG 7976 --- [ restartedMain] org.hibernate.SQL : alter table if exists orders add constraint FKpktxwhj3x9m4gth5ff6bkqgeb foreign key (member_id) references member2023-09-06T15:55:46.901+09:00 INFO 7976 --- [ restartedMain] p6spy : #1693983346901 | took 1ms | statement | connection 4| url jdbc:h2:mem:1f4065c7-8198-4f9e-a2f8-a5551835504b 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-09-06T15:55:46.903+09:00 INFO 7976 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'2023-09-06T15:55:46.956+09:00 WARN 7976 --- [ restartedMain] 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 warning2023-09-06T15:55:47.167+09:00 INFO 7976 --- [ restartedMain] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]2023-09-06T15:55:47.418+09:00 INFO 7976 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 357292023-09-06T15:55:47.469+09:00 INFO 7976 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8086 (http) with context path ''2023-09-06T15:55:47.487+09:00 INFO 7976 --- [ restartedMain] jpabooks.jpashop.JpashopApplication : Started JpashopApplication in 5.642 seconds (process running for 6.434)
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
확실한 답을 못얻었습니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 일단 페치조인으로 둘이상의 컬렉션은 페치 조인 할 수 없다는 걸 알았습니다, 이럴땐 배치사이즈로 컬렉션들을 in 절로 끌고오면 되는것도 이해했습니다. 궁금한것은 in절로 끌고온 컬렉션들안에 또 @oneToMany로 선언된 엔티티가 존재한다면 그 컬렉션들은 @Batchsize옵션으로 in절로 끌고 올 수 가 없나요? 배치 사이즈를 줘도 컬조회할 기준 엔티티에 직접적으로 존재하지 않는 컬렉션 엔티티들은 in절로 끌고오지않고 n+1이 터지는것같습니다
-
미해결토비의 스프링 부트 - 이해와 원리
spring url 리다이렉트/포워딩 기술적 문의 드립니다
spring url 리다이렉트/포워딩 기술적 문의 드립니다안녕하세요 김동희입니다제가 공공기관 프로젝트에 개발자로 참여중입니다이쪽프로젝트 환경은jsp + 전자정부프레임웍(Spring) + html + postgre(db) 입니다이쪽 pm 이 알아봐달라고 부탁하는 사항이 있고,제가 생각하기에도 궁굼해서혹시 이런부분이 될런지 문의 드립니다메인 정부기관 홈페이지는 아래입니다 ex)https://www.url01.urlcom각 전국 지역별(강원,인천,제주..) 지자체관 별로 별도로 지역별 블로그 형식으로 지자체관 형식을 뛰웁니다ex) 강원특별자치도 인제군 지자체관https://www.url01.urlcom/xxx/xxx/xxxx/xxxxx/infoMain.do?ctpv=6420000&sgg=4330000하지만, 고객(공무원)측에서 url 하위로 깔리는 url 변수를 보여주지 말라지자체관별로 단축 url 을 사용 할 수 있게 해달라고 합니다 as-is https://www.url01.urlcom/xxx/xxx/xxxx/xxxxx/infoMain.do?ctpv=6420000&sgg=4330000to-be https://www.url01.urlcom/injegun 혹시 요청이 현재 spring(전자정부프레임웍) + jsp + tiels 환경에서 이 환경에서 고객(공무원) 들의 요청을 수렴해서반영 할 수 있을지 모르겠습니다 AA,TA 적인 기술적인 측면에서스프링의 config 또는 다른설정값 변경, 인터셉터변경, ~Controller~.java 변경~tiles.xml 변경 등을 통해서 가능 할까요?염치 불구하고 저도 이런부분이 궁금하기도 해서 문의 드립니다김동희 드림
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Dockerfile 질문
Dockerfile에서 FROM은 base 이미지를 지정할 수 있는데요, 보통 ubuntu와 같은 OS를 지정하는 것으로 알고 있습니다. 만약 FROM ubuntu로 지정했을 경우 ubuntu OS로 해당 컨테이너가 동작하며 그 안에서 jdk를 설치하고 앱을 실행하고 하는 작업이 가능할 것 같은데요FROM에 그냥 jdk를 지정하면 java는 jvm을 통해 OS에 종속되지 않고 앱이 실행 가능하니 정상 실행될 것이라는 것은 알지만 컨테이너의 OS는 어떻게 되는것인가요?
-
미해결스프링 부트 - 핵심 원리와 활용
톰캣 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]05-Sep-2023 22:30:29.170 INFO [main] org.apache.catalina.startup.Catalina.start 서버가 [94] 밀리초 내에 시작되었습니다.Connected to server[2023-09-05 10:30:29,513] Artifact Gradle : hello : server-0.0.1-SNAPSHOT.war (exploded): Artifact is being deployed, please wait...[2023-09-05 10:30:29,550] Artifact Gradle : hello : server-0.0.1-SNAPSHOT.war (exploded): Error during artifact deployment. See server log for details.[2023-09-05 10:30:29,551] Artifact Gradle : hello : server-0.0.1-SNAPSHOT.war (exploded): com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException: D:\inflearn\boot-source-20230228\start\server\build\libs\exploded\server-0.0.1-SNAPSHOT.war not found for the web module.톰캣을 run하면 위처럼 성공했다는 메시지와 실패했다는 메시지가 둘다 나오고 서버는 실행중인대 페이지들은 전부 404에러가 뜹니다.근대 메시지대로 libs폴더안에 수동으로 exploded폴더를 만들고 빌드했던 war파일을 넣어주면 정상 작동합니다. 이건 톰캣서버가 자동으로 해주어야 하는대 왜 안되는 걸까요? jdk17.0.5 gradle7.5입니다
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
윈도우에서 build시 오류 발생
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]여기에 질문 내용을 남겨주세요.cmd터미널창에 gradlew.bat build를 입력하면 아래 사진과 같은 오류가 발생합니다 ㅠ
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
penJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release. 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요.OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.이러한 오류가 뜨는데, 실행하는데는 문제가 없습니다. 이 오류를 고쳐야 할 것 같은데, 어떻게 고쳐야할까요?
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
restApi, html api 스펙
restApi를 배울땐 api스펙이 달라져서 데이터를 보낼때와 받을때 Dto로 바꿔서 했는데html에서 데이터를 보낼때는 Dto로 만들지 않고 entity로 데이터를 주고 받는데 html에서도 dto로 바꿔서 해야하는 거 아닌가요???
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
gradle
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]버전을 깔았는데 빌드 그래들이 전혀 보이지 않습니다.ㅜ
-
미해결호돌맨의 요절복통 개발쇼 (SpringBoot, Vue.JS, AWS)
E..dito...r에 대한 질문...
난독증이 있는건지 내용은 그대론데 읽을 때마다 내용이 달라지는 것 같아 질문을 남깁니다...다른 분들이 작성하고, 호돌맨님께서 남기신 답글들을 보고 나서 제가 이해한 것이 맞는지 확인 부탁드립니다... 1. 자판기 비유에 대한 내용1.1. request(edit), domain(editor)를 작성하셨는데, 말씀하시는 부분이 (결국 같은 내용이겠지만...) request(edit)에는 edit.title, edit.content(100원, 500원)(동전)뿐만 아니라 추후에 예를 들어 edit.name, edit.gender(1000원, 10000원)(지폐)가 넘어 올 수도 있는 상황이 발생할 수도 있는데, 지폐(name, gender)는 받고 싶지 않은 상황에서 domain(editor)(금액 투입구)를 사용하지 않으면, 지폐가 들어오는 것을 막을 수 없고, 추후에 불필요한 지폐를 걸러내는 작업이 발생하기 때문에 애초에 입구 자체를 동전만 넣을 수 있는 domain(editor) 금액 투입구를 만들게 되면, 들어온 모든 동전은 사용에 필요한 값이기 때문에 불필요하게 걸러내는 작업이 없어진다고 생각하는 것이 맞을까요...? (같은 말인 것 같은데... 예를 더 어렵게 만든 것 같아 죄송합니다...) 호돌맨님이 if를 통해 기존 값을 사용하는 방식2.1 이 말은 즉, 위 예를 연속해서 사용하자면 [사람 1]이 edit.title(100원)을 넣은 상태에서 [사람 2]가 edit.content(500원)짜리를 넣어도 [사람 2] 때문에 [사람 1]이 넣은 edit.title(100원)이 사라지면 안되기 때문에 사용한다는 말씀이 맞으실까요? (물론 위의 예는 [사람 2]가 edit.title(100원)을 넣게되면 금액이 추가되는 것이 아니라 동전이 변경되야 한다는 오류가 있긴 하지만... 그냥 사용하겠습니다...) 뭔가 작성하면서 또 이해가 된 것 같긴하지만... 틀린 부분이 있다면 지적 부탁드립니다... 또 예를 추가하고 글을 복잡하게 만들어 죄송합니다...
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
배포까지 완료한 프로젝트 수정 질문있습니다!
안녕하세요~ 강사님!강의보고 다 만들고 배포까지 완료한 홈페이지에서 수정할게 있어서 수정해서 git에 업로드까지 했습니다.그런데 Ec2 서버에 적용시킬때 기존 library-app폴더를 완전히 삭제 후 다시 git에서 전체 업로드 해서 빌드해야하나요?? 아니면 부분 수정이 가능 한걸까요??어떤 방법으로 수정처리 해야하는지 궁금합니다!!!
-
미해결스프링 시큐리티
SecurityConfig질문
안녕하세요 강의잘듣고 있습니다!. 해당 강의부터 엑셀에 작성해주신대로 05-01브랜치를 참고하여 강의를 진행하고 있습니다. SecurityConfig.java를 보면, ajax LOGIN방식을 DSL로 구현한게 Form방식과 합쳐져 있는데 이 설정하나로 form / ajax로그인 두 방식모두 지원하는건가요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
testMember 시 insert가 안 되는 문제
testMember에서 table은 생성이 되는데 값이 insert가 안 됩니다.구글링을 해도 이유를 모르겠어서 질문 드립니다.[directory 구조][Member.java][Repository][MemberRepositoryTest][application.yml][build.gradle]plugins { id 'java' id 'org.springframework.boot' version '3.1.3' id 'io.spring.dependency-management' version '1.1.3' } group = 'com.jpabook' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '17' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-devtools' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation("org.junit.vintage:junit-vintage-engine") { exclude group: "org.hamcrest", module: "hamcrest-core" } } tasks.named('test') { useJUnitPlatform() } test { useJUnitPlatform() } [실행 후 DB] 아래의 log를 보면 create 쿼리가 날라가는 것은 확인 되지만 insert query는 보이지 않습니다.[log] :: Spring Boot :: (v3.1.3)2023-09-05T04:30:50.821+09:00 INFO 49729 --- [ restartedMain] com.jpabook.jpabook.JpabookApplication : Starting JpabookApplication using Java 17.0.6 with PID 49729 (/Users/innahyeon/study/jpabook/build/classes/java/main started by innahyeon in /Users/innahyeon/study/jpabook)2023-09-05T04:30:50.822+09:00 INFO 49729 --- [ restartedMain] com.jpabook.jpabook.JpabookApplication : No active profile set, falling back to 1 default profile: "default"2023-09-05T04:30:50.841+09:00 INFO 49729 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable2023-09-05T04:30:50.841+09:00 INFO 49729 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'2023-09-05T04:30:51.061+09:00 INFO 49729 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.2023-09-05T04:30:51.068+09:00 INFO 49729 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 4 ms. Found 0 JPA repository interfaces.2023-09-05T04:30:51.294+09:00 INFO 49729 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)2023-09-05T04:30:51.298+09:00 INFO 49729 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]2023-09-05T04:30:51.298+09:00 INFO 49729 --- [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.12]2023-09-05T04:30:51.320+09:00 INFO 49729 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext2023-09-05T04:30:51.321+09:00 INFO 49729 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 480 ms2023-09-05T04:30:51.331+09:00 INFO 49729 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...2023-09-05T04:30:51.387+09:00 INFO 49729 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:tcp://localhost/~/jpastudy1 user=SA2023-09-05T04:30:51.388+09:00 INFO 49729 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.2023-09-05T04:30:51.392+09:00 INFO 49729 --- [ restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:tcp://localhost/~/jpastudy1'2023-09-05T04:30:51.435+09:00 INFO 49729 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]2023-09-05T04:30:51.460+09:00 INFO 49729 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final2023-09-05T04:30:51.461+09:00 INFO 49729 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer2023-09-05T04:30:51.511+09:00 INFO 49729 --- [ restartedMain] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy2023-09-05T04:30:51.568+09:00 INFO 49729 --- [ restartedMain] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer2023-09-05T04:30:51.660+09:00 INFO 49729 --- [ restartedMain] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy2023-09-05T04:30:51.882+09:00 INFO 49729 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]2023-09-05T04:30:51.887+09:00 DEBUG 49729 --- [ restartedMain] org.hibernate.SQL : drop table if exists member cascade Hibernate: drop table if exists member cascade 2023-09-05T04:30:51.889+09:00 DEBUG 49729 --- [ restartedMain] org.hibernate.SQL : drop sequence if exists member_seqHibernate: drop sequence if exists member_seq2023-09-05T04:30:51.891+09:00 DEBUG 49729 --- [ restartedMain] org.hibernate.SQL : create sequence member_seq start with 1 increment by 50Hibernate: create sequence member_seq start with 1 increment by 502023-09-05T04:30:51.892+09:00 DEBUG 49729 --- [ restartedMain] org.hibernate.SQL : create table member ( id bigint not null, username varchar(255), primary key (id) )Hibernate: create table member ( id bigint not null, username varchar(255), primary key (id) )2023-09-05T04:30:51.895+09:00 INFO 49729 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'2023-09-05T04:30:51.926+09:00 WARN 49729 --- [ restartedMain] 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 warning2023-09-05T04:30:51.975+09:00 INFO 49729 --- [ restartedMain] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]2023-09-05T04:30:52.047+09:00 INFO 49729 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 357292023-09-05T04:30:52.061+09:00 INFO 49729 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''2023-09-05T04:30:52.066+09:00 INFO 49729 --- [ restartedMain] com.jpabook.jpabook.JpabookApplication : Started JpabookApplication in 1.393 seconds (process running for 1.638)
-
미해결스프링 시큐리티
메소드방식 인가처리와 URL 방식 인가처리를 중첩으로 설정할 경우 메소드방식 인가처리가 적용되는 이유
메소드방식 인가처리와 URL 방식 인가처리를 중첩으로 설정할 경우 메소드방식 인가처리가 적용되더라고요추측이지만 메소드방식 인가처리가 URL인가처리 이후 실행되기 때문이라고 생각이 드는데 맞을까요?
-
해결됨실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
API 호출 방법
안녕하세요. JPA 활용 강의를 들으며 추가로 REST API에 대해 공부중입니다.@Controller에서 페이지 렌더링을 하고,@RestController에서 API를 작성하는 것은 이해했습니다. 그러나 model로만 데이터를 넘기다가 API에 대해 공부를하다보니 호출 방식에 대해 이해가 되지 않습니다. 만약에 회원조회 기능을 만든다고 가정하면[1]@RestController에서 /api/members에서 회원 조회하여 ResponseEntity<MemberDto>를 리턴해주고,@Controller에서 /api/members를 호출한 다음에 MemberDto로 변경하여 Model에 담은 후 /memberList로 렌더링 [2]@Controller에서 /memberList로 렌더링한 후, javascript에서 fetch()를 사용하여 /api/members를 호출하여 가져온 값을 화면에 뿌려줌 제가 고민해본 방식은 위 2가지입니다... 올바른 방식이 있는지,, 없다면 어떤 방식이 맞는 지 조언 해주시면 감사하겠습니다... ========================================앗 해당 질문글을 작성한 후 더 공부를 해보았는데요,CSR (클라이언트 사이드 렌더링)와 SSR (서버 사이드 렌더링) 방식으로 두 가지 방식 모두 존재하는 방식이었군요... (제가 고민해본 방식과 CSR, SSR가 동일한 방식인지는 모르겠습니다... 맞나요...?) 페이지 이동과 동시에 조회가 필요한 곳인 경우 (필터 없이 회원조회) = 페이지 렌더링할때 api를 호출하여 model에 담아 넘기고, 필터로 조회하는 경우 = API만 호출하여 데이터 보여주기 위에 내용으로 개발하면 될까요?? (저는 현재 백엔드 개발자를 준비하며 혼자서 포트폴리오용 프로젝트를 만들고있습니다!)
-
해결됨토비의 스프링 부트 - 이해와 원리
spring bean 에 대해서 질문 있습니다.
bean 등록 기준이 있을까요? 1안public class ExcelExtractor { private final File file; public List<Data> excetued() { // extract logic } } 2안@Component public class ExcelExtractor { public List<Data> excetued(File file) { // extract logic } } 1안은 스프링 빈 등록 없이 사용하는 코드입니다. 2안은 빈으로 등록하여 사용합니다. 빈으로 등록했을 때 장점은 의존성 주입을 통해서 어떤 객체를 의존하는지 한 눈에 알 수 있다고 생각합니다.1안으로 사용하면 ExcelExtractor 객체는 서비스 클래스의 메소드 안에서 생성됩니다. 의존성이 숨겨져 있다고 생각합니다.2안으로 사용하면 서비스 클래스 의존성에 ExcelExtractor을 추가해서 명시적으로 표시할 수 있습니다.
-
미해결실습으로 배우는 선착순 이벤트 시스템
안녕하세요 강사님 이전 재고 관리 강의와 차이에 대해 궁금합니다.
쿠폰 생성 발급 로직도컬럼에 쿠폰의 개수를 지정해놓으면이전 강의랑 똑같은 거 같은데왜 이번 강의는 쿠폰 엔티티를 새로 생성해서 그 개수를 체크하는 건지 궁금합니다.이전 컬럼에 개수를 두어 관리하는 거랑지금처럼 엔티티를 생성하는 방식의 차이점이 너무 궁금해요 항상 감사합니다.
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Resilience4JCircuitBreakerFactory id
return factory 객체에서 생성하는 Resilience4JConfigBuilder에게 전달되는 id 값은 직접 주입하는것이 아닌것 같은데요,circuitBreakerFactory create시에 지정하는 name 값이 컨테이너를 통해 주입되는건가요?만약 그렇다면 생성된 모든 circuitBreakerFactory을 조회해서 id를 주입하는 로직이 있는건가요?
-
해결됨스프링 시큐리티
setSharedObject 메소드 질문있습니다!.
안녕하세요 강사님 강의 잘듣고 있습니다. 아래 코드가 필요한가요? 공유해야하는 이유를 잘모르겠구 주석해도 정상작동하는거 같아서 질문드립니다! 감사합니다!.http.setSharedObject(AjaxLoginProcessingFilter.class, getAuthenticationFilter());