묻고 답해요
141만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨실전! 스프링 데이터 JPA
섹션 5 사용자 정의 레포지토리 구현 질문드립니다.
기본적인 java 개념 부족일수도 있습니다만강의 내용중에 사용자 정의레포지를 만들땐 Impl을 뒤에 꼭 붙여야 한다고 나와있고, 최신화된 강의내용을 봐도 그렇게 알고있는데요,그런데 이게 왜 Spring Data JPA에서 제공해야하는 기능인지 이해가 잘 안갑니다. Spring Data JPA가 지원을 안해주면 왜 오류를 뱉어야 하는지가 궁금합니다. 예를들어public interface RepositoryAInterface 와이를 구현한public class RepositoryA implements RepsitoryAInterface가 있다고 했을때,그리고 RepositoryA를 JPA을 이용하여 구현할때,EntityManager를 DI해서 직접 구현 하잖아요?그럼 끝난거 아닌가요? Spring Data JPA를 사용하는public interface RepositoryBInterface extends JPARepository<>가있다고 하면요.여기서 extends RepositoryA를 하나 추가했다고 해서 왜 에러가 나는 것인가요?그냥 이게 Spring Data JPA가 아니라 일반적인 java라고 생각해봤을때RepositoryBInterface가 있고, 이 인터페이스는RepositoryAinterface를 extends하였고,RepositoryAinterface는 Repository가 구현하고있으니RepositoryBInterface만 구현하면 되는거 아닌가요?그리고 이것은 SpringDataJpa가 해주고요Spring Data Jpa가 RepositoryAinterface에 대해 근본적으로 왜 알아야하는 궁금합니다. 근데 알아야 하니까 Impl을 붙어야 작동하겠죠?만약에 Impl이 없으면 어떠한 동작과정중에 에러가 생겨 동작을 제대로 하지 않는 것일까요..?
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
3강 Spring Cloud Gateway - Custom Filter 적용 Bean 관련 질문있습니다.
안녕하세요 수업 잘 듣고 있습니다. 수업중 내용에 관해서 질문이 있어서 질문을 남깁니다. 수업 5분50초쯤에 Gateway Filter를 Bean으로 하나 등록한다고 하셨는데 @Component어노테이션이 붙은 클래스의 아래의 메소드의 반환값은 자동으로 Bean으로 등록되나요? @Bean어노테이션을 붙여줘야 등록이되는 줄 알았는데 제가 잘못이해하고있었는지 궁금해서 질문을 남깁니다.
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
Junit5에서는 fail 없이 사용해도 되나요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]Junit5는 expected말고 assertThrows를 사용하는데 fail하고 같이 사용하면 assertThrows에서 예외가 터져도 fail문도 같이 실행되서 테스트 녹색불이 안들어오더라고요 반대로 fail문을 사용하지 않으면 녹색불이 들어오고요 어떻게 하는게 맞나요?
-
해결됨실전! Querydsl
영속성 콘텍스트의 범위.
=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]안녕하세요.영속성콘텍스트에 영속화된 Entity 로 생각이 드는데도 불구하고 영속성 콘텍스트가 아니고 쿼리의 호출결과로 데이터를 얻어오는 부분이 있어서 질문을 드립니다.테스트 코드는 아래와 같습니다.참고: boardId = boardEntity @Id@Transactional public BoardDto updateBoard(Integer boardId, String title) { jBoardEntity entity = jpaQueryFactory.selectFrom(boardEntity).where(boardEntity.baordId.eq(boardId)).fetchOne(); entity.updateTitle(title); entityManagerFactory.getPersistenceUnitUtil().isLoaded(entity) // true return jpaQueryFactory.selectFrom(boardEntity).where(boardEntity.baordId.eq(boardId)).fetchOne(); }에서 처음 selectFrom 때 select 쿼리후 entity 정상반환하여 영속회되고 update title 문까지 정상동작합니다.이후 영속성 콘텍스트에 로드가 됐다는걸 확인해보았고 동일한 ID 의 entity 를 조회했을때는 영속성 컨텍스트에서 제공되길 기대했으나 console 로그에는 sql 이 나가는 것으로 보아 실제 db 에 sql 이 작동한것으로 보입니다.혹시 제가 놓친 부분이있다면 말씀해주시면 감사하겠습니다.
-
미해결실전! 스프링 데이터 JPA
2023년 9월 기준 p6spy dependency 추가
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.6.2 spring boot 2.7.15 기준으로 p6spy dependency 추가 중 반영이 안되어 찾아보니 1.6.2으로 하면 적용되네요학습하시는 분들 참고하시면 될 것 같습니다.
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
서버 배포 했는데 사이트에 보안 연결이 안되네요
배포까지 완료해서 인바운드 규칙 하라는대로 제대로 설정하고 사이트에 접속했는데 사이트에 보안 연결할 수 없음이라고 뜨네요 보니까 스프링 부트는 잘 실행되고 제대로 서버가 열린것은 맞습니다 터미널에 제가 https://52.79.237.17:8080/v1/index.html 이런식으로 입력하였을 경우에 2023-09-17 11:14:48.397 INFO 35174 --- [nio-8080-exec-1] o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x020x000x010x000x010xfc0x030x030x14k0x8a0xdc%0xdc0xf60xcdv]e0x88<0xce0xf0k]0x9at0x9f3af0x1b0x8bi0x060xe160xd1_0xa2 ]. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419) ~[tomcat-embed-core-9.0.69.jar!/:na] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271) ~[tomcat-embed-core-9.0.69.jar!/:na] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.69.jar!/:na] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891) ~[tomcat-embed-core-9.0.69.jar!/:na] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784) ~[tomcat-embed-core-9.0.69.jar!/:na] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.69.jar!/:na] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.69.jar!/:na] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.69.jar!/:na] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.69.jar!/:na] at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]이러한 문구들이 출력됩니다 어떻게 해결해야하나요
-
해결됨자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
CI/ CD 구축 방법 문의
강사님 강의 잘 보고 있는데 CI/ CD 구축 하려는데 간단하게 할만한 방법 추천 부탁드립니다.
-
해결됨자바 ORM 표준 JPA 프로그래밍 - 기본편
antlr.NoViableAltException: unexpected token: Member
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요.antlr.NoViableAltException: unexpected token: Member문제가 생기는데, 몇시간동안 고민해봐도 도대체 뭐가 문제인지 모르겠어서 봐주시면 감사하겠습니다JpaMain.javaimport javax.persistence.*; import java.util.List; public class JpaMain { public static void main(String[] args) { EntityManagerFactory emf = Persistence.createEntityManagerFactory("hello"); EntityManager em = emf.createEntityManager(); EntityTransaction tx = em.getTransaction(); tx.begin(); /* try { Member member = new Member(); member.setId(3L); member.setName("HelloC"); //em.persist(member);//저장 끝 Member findMember = em.find(Member.class, 1L); findMember.setName("HelloJPA"); //이렇게만 해도 DB에서도 수정 반영 //왜냐하면 find를 통해 가져오면 JPA가 관리해주기 때문 Member findMember2 = em.find(Member.class, 5L); em.remove(findMember2); tx.commit(); }catch (Exception e){ tx.rollback(); }finally { em.close(); } */ try{ List<Member> result = em.createQuery("SELECT m FROM Member AS m", Member.class) .getResultList(); for (Member member : result){ System.out.println("member.name = "+member.getName()); } tx.commit(); }catch (Exception e){ tx.rollback(); }finally { em.close(); } emf.close(); } } Member.javaimport javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; //@Entity 어노테이션은 JPA가 VO를 인식하게 해준다. @Entity @Table(name = "MEMBER")//여기서 name은 DB 테이블의 이름 public class Member { //JPA에게 기본키라고 알려준다. @Id private Long id; @Column(name="name") private String name; //Getter, Setter … public String getName() { return name; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public void setName(String name) { this.name = name; } }persistence.xml<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"> <persistence-unit name="hello"> <properties> <!-- 필수 속성 --> <property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/> <property name="javax.persistence.jdbc.user" value="sa"/> <property name="javax.persistence.jdbc.password" value=""/> <property name="javax.persistence.jdbc.url" value="jdbc:h2:tcp://localhost/~/test"/> <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/> <!-- 옵션 --> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="hibernate.use_sql_comments" value="true"/> <!--<property name="hibernate.hbm2ddl.auto" value="create" />--> </properties> </persistence-unit> </persistence> pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>jpa-basic</groupId> <artifactId>ex1-hello-jpa</artifactId> <version>1.0.0</version> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>8</source> <target>8</target> </configuration> </plugin> </plugins> </build> <dependencies> <!-- JPA 하이버네이트 --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>5.4.29.Final</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.1</version> </dependency> <!-- H2 데이터베이스 --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.4.200</version> </dependency> <!-- logback --> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.3</version> </dependency> </dependencies> </project> 오류 메세지C:\Users\zzaaq\.jdks\corretto-1.8.0_382\bin\java.exe "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.2\lib\idea_rt.jar=57341:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\charsets.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\access-bridge-64.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\cldrdata.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\dnsns.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\jaccess.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\jfxrt.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\localedata.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\nashorn.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\sunec.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\sunjce_provider.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\sunmscapi.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\sunpkcs11.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\zipfs.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jce.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jfr.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jfxswt.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jsse.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\management-agent.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\resources.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\rt.jar;C:\study-kimyounghan\ex1-hello-jpa\target\classes;C:\Users\zzaaq\.m2\repository\org\hibernate\hibernate-core\5.4.29.Final\hibernate-core-5.4.29.Final.jar;C:\Users\zzaaq\.m2\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;C:\Users\zzaaq\.m2\repository\javax\persistence\javax.persistence-api\2.2\javax.persistence-api-2.2.jar;C:\Users\zzaaq\.m2\repository\org\javassist\javassist\3.27.0-GA\javassist-3.27.0-GA.jar;C:\Users\zzaaq\.m2\repository\net\bytebuddy\byte-buddy\1.10.21\byte-buddy-1.10.21.jar;C:\Users\zzaaq\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\zzaaq\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.1.1.Final\jboss-transaction-api_1.2_spec-1.1.1.Final.jar;C:\Users\zzaaq\.m2\repository\org\jboss\jandex\2.2.3.Final\jandex-2.2.3.Final.jar;C:\Users\zzaaq\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\zzaaq\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Users\zzaaq\.m2\repository\org\dom4j\dom4j\2.1.3\dom4j-2.1.3.jar;C:\Users\zzaaq\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\zzaaq\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.1\jaxb-runtime-2.3.1.jar;C:\Users\zzaaq\.m2\repository\org\glassfish\jaxb\txw2\2.3.1\txw2-2.3.1.jar;C:\Users\zzaaq\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.7\istack-commons-runtime-3.0.7.jar;C:\Users\zzaaq\.m2\repository\org\jvnet\staxex\stax-ex\1.8\stax-ex-1.8.jar;C:\Users\zzaaq\.m2\repository\com\sun\xml\fastinfoset\FastInfoset\1.2.15\FastInfoset-1.2.15.jar;C:\Users\zzaaq\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;C:\Users\zzaaq\.m2\repository\com\h2database\h2\1.4.200\h2-1.4.200.jar;C:\Users\zzaaq\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\zzaaq\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\zzaaq\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar JpaMain 20:07:18.660 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider 20:07:18.742 [main] DEBUG org.hibernate.jpa.HibernatePersistenceProvider - Located and parsed 1 persistence units; checking each 20:07:18.742 [main] DEBUG org.hibernate.jpa.HibernatePersistenceProvider - Checking persistence-unit [name=hello, explicit-provider=null] against incoming persistence unit name [hello] 20:07:18.742 [main] DEBUG org.hibernate.jpa.boot.spi.ProviderChecker - No PersistenceProvider explicitly requested, assuming Hibernate 20:07:18.747 [main] DEBUG org.hibernate.jpa.internal.util.LogHelper - PersistenceUnitInfo [ name: hello persistence provider classname: null classloader: null excludeUnlistedClasses: false JTA datasource: null Non JTA datasource: null Transaction type: RESOURCE_LOCAL PU root URL: file:/C:/study-kimyounghan/ex1-hello-jpa/target/classes/ Shared Cache Mode: null Validation Mode: null Jar files URLs [] Managed classes names [] Mapping files names [] Properties [ javax.persistence.jdbc.driver: org.h2.Driver javax.persistence.jdbc.password: javax.persistence.jdbc.url: jdbc:h2:tcp://localhost/~/test hibernate.dialect: org.hibernate.dialect.H2Dialect hibernate.show_sql: true hibernate.format_sql: true javax.persistence.jdbc.user: sa hibernate.use_sql_comments: true] 20:07:18.751 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl - Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator]. 20:07:18.752 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl - Adding Integrator [org.hibernate.secure.spi.JaccIntegrator]. 20:07:18.757 [main] DEBUG org.hibernate.integrator.internal.IntegratorServiceImpl - Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator]. 20:07:18.816 [main] INFO org.hibernate.Version - HHH000412: Hibernate ORM core version 5.4.29.Final 20:07:18.817 [main] DEBUG org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found 20:07:18.940 [main] DEBUG org.hibernate.service.spi.ServiceBinding - Overriding existing service binding [org.hibernate.secure.spi.JaccService] 20:07:18.948 [main] DEBUG org.hibernate.cache.internal.RegionFactoryInitiator - Cannot default RegionFactory based on registered strategies as `[]` RegionFactory strategies were registered 20:07:18.949 [main] DEBUG org.hibernate.cache.internal.RegionFactoryInitiator - Cache region factory : org.hibernate.cache.internal.NoCachingRegionFactory 20:07:18.964 [main] INFO org.hibernate.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.1.2.Final} 20:07:19.720 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration boolean -> org.hibernate.type.BooleanType@3eb7fc54 20:07:19.720 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration boolean -> org.hibernate.type.BooleanType@3eb7fc54 20:07:19.721 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Boolean -> org.hibernate.type.BooleanType@3eb7fc54 20:07:19.721 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration numeric_boolean -> org.hibernate.type.NumericBooleanType@47d90b9e 20:07:19.721 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration true_false -> org.hibernate.type.TrueFalseType@149e0f5d 20:07:19.722 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration yes_no -> org.hibernate.type.YesNoType@6af93788 20:07:19.722 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration byte -> org.hibernate.type.ByteType@1c93084c 20:07:19.722 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration byte -> org.hibernate.type.ByteType@1c93084c 20:07:19.722 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Byte -> org.hibernate.type.ByteType@1c93084c 20:07:19.723 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration character -> org.hibernate.type.CharacterType@5223e5ee 20:07:19.723 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration char -> org.hibernate.type.CharacterType@5223e5ee 20:07:19.723 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Character -> org.hibernate.type.CharacterType@5223e5ee 20:07:19.724 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration short -> org.hibernate.type.ShortType@1d119efb 20:07:19.724 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration short -> org.hibernate.type.ShortType@1d119efb 20:07:19.724 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Short -> org.hibernate.type.ShortType@1d119efb 20:07:19.725 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration integer -> org.hibernate.type.IntegerType@49b0b76 20:07:19.725 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration int -> org.hibernate.type.IntegerType@49b0b76 20:07:19.725 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Integer -> org.hibernate.type.IntegerType@49b0b76 20:07:19.727 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration long -> org.hibernate.type.LongType@be64738 20:07:19.727 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration long -> org.hibernate.type.LongType@be64738 20:07:19.727 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Long -> org.hibernate.type.LongType@be64738 20:07:19.728 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration float -> org.hibernate.type.FloatType@4b5d6a01 20:07:19.728 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration float -> org.hibernate.type.FloatType@4b5d6a01 20:07:19.728 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Float -> org.hibernate.type.FloatType@4b5d6a01 20:07:19.729 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration double -> org.hibernate.type.DoubleType@3c130745 20:07:19.729 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration double -> org.hibernate.type.DoubleType@3c130745 20:07:19.729 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Double -> org.hibernate.type.DoubleType@3c130745 20:07:19.730 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration big_decimal -> org.hibernate.type.BigDecimalType@703580bf 20:07:19.730 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.math.BigDecimal -> org.hibernate.type.BigDecimalType@703580bf 20:07:19.731 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration big_integer -> org.hibernate.type.BigIntegerType@70e8f8e 20:07:19.731 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.math.BigInteger -> org.hibernate.type.BigIntegerType@70e8f8e 20:07:19.732 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration string -> org.hibernate.type.StringType@6e4784bc 20:07:19.732 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.String -> org.hibernate.type.StringType@6e4784bc 20:07:19.733 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration nstring -> org.hibernate.type.StringNVarcharType@4b0b0854 20:07:19.733 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration ncharacter -> org.hibernate.type.CharacterNCharType@353d0772 20:07:19.733 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration url -> org.hibernate.type.UrlType@13e39c73 20:07:19.733 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.net.URL -> org.hibernate.type.UrlType@13e39c73 20:07:19.734 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration Duration -> org.hibernate.type.DurationType@6580cfdd 20:07:19.734 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.Duration -> org.hibernate.type.DurationType@6580cfdd 20:07:19.745 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration Instant -> org.hibernate.type.InstantType@41e36e46 20:07:19.745 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.Instant -> org.hibernate.type.InstantType@41e36e46 20:07:19.746 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration LocalDateTime -> org.hibernate.type.LocalDateTimeType@2145b572 20:07:19.746 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.LocalDateTime -> org.hibernate.type.LocalDateTimeType@2145b572 20:07:19.747 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration LocalDate -> org.hibernate.type.LocalDateType@1cbbffcd 20:07:19.747 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.LocalDate -> org.hibernate.type.LocalDateType@1cbbffcd 20:07:19.748 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration LocalTime -> org.hibernate.type.LocalTimeType@28eaa59a 20:07:19.748 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.LocalTime -> org.hibernate.type.LocalTimeType@28eaa59a 20:07:19.748 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration OffsetDateTime -> org.hibernate.type.OffsetDateTimeType@35ef1869 20:07:19.748 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.OffsetDateTime -> org.hibernate.type.OffsetDateTimeType@35ef1869 20:07:19.749 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration OffsetTime -> org.hibernate.type.OffsetTimeType@708f5957 20:07:19.749 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.OffsetTime -> org.hibernate.type.OffsetTimeType@708f5957 20:07:19.751 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration ZonedDateTime -> org.hibernate.type.ZonedDateTimeType@7714e963 20:07:19.752 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.time.ZonedDateTime -> org.hibernate.type.ZonedDateTimeType@7714e963 20:07:19.753 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration date -> org.hibernate.type.DateType@192d43ce 20:07:19.753 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Date -> org.hibernate.type.DateType@192d43ce 20:07:19.753 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration time -> org.hibernate.type.TimeType@43195e57 20:07:19.753 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Time -> org.hibernate.type.TimeType@43195e57 20:07:19.754 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration timestamp -> org.hibernate.type.TimestampType@6e171cd7 20:07:19.754 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Timestamp -> org.hibernate.type.TimestampType@6e171cd7 20:07:19.754 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.Date -> org.hibernate.type.TimestampType@6e171cd7 20:07:19.755 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration dbtimestamp -> org.hibernate.type.DbTimestampType@59fd97a8 20:07:19.756 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration calendar -> org.hibernate.type.CalendarType@61862a7f 20:07:19.756 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.Calendar -> org.hibernate.type.CalendarType@61862a7f 20:07:19.756 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.GregorianCalendar -> org.hibernate.type.CalendarType@61862a7f 20:07:19.757 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration calendar_date -> org.hibernate.type.CalendarDateType@1d9b7cce 20:07:19.757 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration calendar_time -> org.hibernate.type.CalendarTimeType@6c80d78a 20:07:19.758 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration locale -> org.hibernate.type.LocaleType@5fdcaa40 20:07:19.758 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.Locale -> org.hibernate.type.LocaleType@5fdcaa40 20:07:19.759 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration currency -> org.hibernate.type.CurrencyType@6e20b53a 20:07:19.759 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.Currency -> org.hibernate.type.CurrencyType@6e20b53a 20:07:19.759 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration timezone -> org.hibernate.type.TimeZoneType@74e52303 20:07:19.759 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.TimeZone -> org.hibernate.type.TimeZoneType@74e52303 20:07:19.760 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration class -> org.hibernate.type.ClassType@5af3afd9 20:07:19.761 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Class -> org.hibernate.type.ClassType@5af3afd9 20:07:19.761 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration uuid-binary -> org.hibernate.type.UUIDBinaryType@4567f35d 20:07:19.761 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.util.UUID -> org.hibernate.type.UUIDBinaryType@4567f35d 20:07:19.762 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration uuid-char -> org.hibernate.type.UUIDCharType@4f18837a 20:07:19.764 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration binary -> org.hibernate.type.BinaryType@a514af7 20:07:19.764 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration byte[] -> org.hibernate.type.BinaryType@a514af7 20:07:19.764 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration [B -> org.hibernate.type.BinaryType@a514af7 20:07:19.765 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration wrapper-binary -> org.hibernate.type.WrapperBinaryType@79924b 20:07:19.766 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration Byte[] -> org.hibernate.type.WrapperBinaryType@79924b 20:07:19.766 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration [Ljava.lang.Byte; -> org.hibernate.type.WrapperBinaryType@79924b 20:07:19.766 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration row_version -> org.hibernate.type.RowVersionType@294425a7 20:07:19.767 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration image -> org.hibernate.type.ImageType@12468a38 20:07:19.768 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration characters -> org.hibernate.type.CharArrayType@5b239d7d 20:07:19.768 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration char[] -> org.hibernate.type.CharArrayType@5b239d7d 20:07:19.768 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration [C -> org.hibernate.type.CharArrayType@5b239d7d 20:07:19.768 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration wrapper-characters -> org.hibernate.type.CharacterArrayType@52bf72b5 20:07:19.769 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration [Ljava.lang.Character; -> org.hibernate.type.CharacterArrayType@52bf72b5 20:07:19.769 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration Character[] -> org.hibernate.type.CharacterArrayType@52bf72b5 20:07:19.769 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration text -> org.hibernate.type.TextType@dd8ba08 20:07:19.770 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration ntext -> org.hibernate.type.NTextType@6ae5aa72 20:07:19.770 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration blob -> org.hibernate.type.BlobType@2d7275fc 20:07:19.771 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Blob -> org.hibernate.type.BlobType@2d7275fc 20:07:19.771 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration materialized_blob -> org.hibernate.type.MaterializedBlobType@478190fc 20:07:19.772 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration clob -> org.hibernate.type.ClobType@564fabc8 20:07:19.772 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.Clob -> org.hibernate.type.ClobType@564fabc8 20:07:19.773 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration nclob -> org.hibernate.type.NClobType@436813f3 20:07:19.773 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.sql.NClob -> org.hibernate.type.NClobType@436813f3 20:07:19.773 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration materialized_clob -> org.hibernate.type.MaterializedClobType@10e31a9a 20:07:19.774 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration materialized_nclob -> org.hibernate.type.MaterializedNClobType@77847718 20:07:19.775 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration serializable -> org.hibernate.type.SerializableType@c8c12ac 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration object -> org.hibernate.type.ObjectType@5b8dfcc1 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration java.lang.Object -> org.hibernate.type.ObjectType@5b8dfcc1 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_date -> org.hibernate.type.AdaptedImmutableType@35e2d654 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_time -> org.hibernate.type.AdaptedImmutableType@1bd4fdd 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_timestamp -> org.hibernate.type.AdaptedImmutableType@55183b20 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_dbtimestamp -> org.hibernate.type.AdaptedImmutableType@4f83df68 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_calendar -> org.hibernate.type.AdaptedImmutableType@6cf0e0ba 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_calendar_date -> org.hibernate.type.AdaptedImmutableType@7d8995e 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_binary -> org.hibernate.type.AdaptedImmutableType@130d63be 20:07:19.777 [main] DEBUG org.hibernate.type.BasicTypeRegistry - Adding type registration imm_serializable -> org.hibernate.type.AdaptedImmutableType@42a48628 20:07:19.785 [main] DEBUG org.hibernate.boot.internal.BootstrapContextImpl - Injecting ScanEnvironment [org.hibernate.jpa.boot.internal.StandardJpaScanEnvironmentImpl@1bb5a082] into BootstrapContext; was [null] 20:07:19.785 [main] DEBUG org.hibernate.boot.internal.BootstrapContextImpl - Injecting ScanOptions [org.hibernate.boot.archive.scan.internal.StandardScanOptions@78691363] into BootstrapContext; was [org.hibernate.boot.archive.scan.internal.StandardScanOptions@41d477ed] 20:07:19.823 [main] DEBUG org.hibernate.boot.internal.BootstrapContextImpl - Injecting JPA temp ClassLoader [null] into BootstrapContext; was [null] 20:07:19.823 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - ClassLoaderAccessImpl#injectTempClassLoader(null) [was null] 20:07:19.833 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid2] -> [org.hibernate.id.UUIDGenerator] 20:07:19.834 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [guid] -> [org.hibernate.id.GUIDGenerator] 20:07:19.835 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid] -> [org.hibernate.id.UUIDHexGenerator] 20:07:19.835 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid.hex] -> [org.hibernate.id.UUIDHexGenerator] 20:07:19.835 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [assigned] -> [org.hibernate.id.Assigned] 20:07:19.836 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [identity] -> [org.hibernate.id.IdentityGenerator] 20:07:19.837 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [select] -> [org.hibernate.id.SelectGenerator] 20:07:19.838 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [sequence] -> [org.hibernate.id.enhanced.SequenceStyleGenerator] 20:07:19.839 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [seqhilo] -> [org.hibernate.id.SequenceHiLoGenerator] 20:07:19.839 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [increment] -> [org.hibernate.id.IncrementGenerator] 20:07:19.839 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [foreign] -> [org.hibernate.id.ForeignGenerator] 20:07:19.840 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [sequence-identity] -> [org.hibernate.id.SequenceIdentityGenerator] 20:07:19.840 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [enhanced-sequence] -> [org.hibernate.id.enhanced.SequenceStyleGenerator] 20:07:19.840 [main] DEBUG org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [enhanced-table] -> [org.hibernate.id.enhanced.TableGenerator] 20:07:19.844 [main] WARN org.hibernate.orm.connections.pooling - HHH10001002: Using Hibernate built-in connection pool (not for production use!) 20:07:19.847 [main] INFO org.hibernate.orm.connections.pooling - HHH10001005: using driver [org.h2.Driver] at URL [jdbc:h2:tcp://localhost/~/test] 20:07:19.847 [main] INFO org.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {user=sa, password=} 20:07:19.847 [main] INFO org.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false 20:07:19.850 [main] DEBUG org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl - Initializing Connection pool with 1 Connections 20:07:19.850 [main] INFO org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl - HHH000115: Hibernate connection pool size: 20 (min=1) 20:07:19.913 [main] DEBUG org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator - Database -> name : H2 version : 1.4.200 (2019-10-14) major : 1 minor : 4 20:07:19.913 [main] DEBUG org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator - Driver -> name : H2 JDBC Driver version : 1.4.200 (2019-10-14) major : 1 minor : 4 20:07:19.913 [main] DEBUG org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator - JDBC version : 4.1 20:07:19.925 [main] INFO org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 20:07:19.975 [main] DEBUG org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder - JDBC driver metadata reported database stores quoted identifiers in neither upper, lower nor mixed case 20:07:20.015 [main] DEBUG org.hibernate.boot.model.relational.Namespace - Created database namespace [logicalName=Name{catalog=null, schema=null}, physicalName=Name{catalog=null, schema=null}] 20:07:20.021 [main] DEBUG org.hibernate.type.spi.TypeConfiguration$Scope - Scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration@17fc391b] to MetadataBuildingContext [org.hibernate.boot.internal.MetadataBuildingContextRootImpl@2b30a42c] 20:07:20.064 [main] DEBUG org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: Member 20:07:20.079 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column: Ejb3DiscriminatorColumn{logicalColumnName'DTYPE', discriminatorTypeName='string'} 20:07:20.082 [main] DEBUG org.hibernate.cfg.annotations.EntityBinder - Import with entity name Member 20:07:20.084 [main] DEBUG org.hibernate.cfg.annotations.EntityBinder - Bind entity Member on table MEMBER 20:07:20.099 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column: Ejb3Column{table=org.hibernate.mapping.Table(MEMBER), mappingColumn=id, insertable=true, updatable=true, unique=false} 20:07:20.103 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - Not known whether passed class name [Member] is safe 20:07:20.103 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - No temp ClassLoader provided; using live ClassLoader for loading potentially unsafe class : Member 20:07:20.103 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - MetadataSourceProcessor property id with lazy=false 20:07:20.105 [main] DEBUG org.hibernate.cfg.AbstractPropertyHolder - Attempting to locate auto-apply AttributeConverter for property [Member:id] 20:07:20.107 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for id 20:07:20.108 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property id 20:07:20.110 [main] DEBUG org.hibernate.cfg.BinderHelper - #makeIdGenerator(org.hibernate.mapping.SimpleValue([org.hibernate.mapping.Column(id)]), id, assigned, , ...) 20:07:20.111 [main] DEBUG org.hibernate.cfg.Ejb3Column - Binding column: Ejb3Column{table=org.hibernate.mapping.Table(MEMBER), mappingColumn=name, insertable=true, updatable=true, unique=false} 20:07:20.111 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - MetadataSourceProcessor property name with lazy=false 20:07:20.111 [main] DEBUG org.hibernate.cfg.AbstractPropertyHolder - Attempting to locate auto-apply AttributeConverter for property [Member:name] 20:07:20.111 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - building SimpleValue for name 20:07:20.111 [main] DEBUG org.hibernate.cfg.annotations.PropertyBinder - Building property name 20:07:20.114 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - Starting fillSimpleValue for id 20:07:20.115 [main] DEBUG org.hibernate.cfg.annotations.SimpleValueBinder - Starting fillSimpleValue for name 20:07:20.115 [main] DEBUG org.hibernate.mapping.PrimaryKey - Forcing column [id] to be non-null as it is part of the primary key for table [member] 20:07:20.173 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - Building session factory 20:07:20.173 [main] DEBUG org.hibernate.cfg.Settings - SessionFactory name : null 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Automatic flush during beforeCompletion(): enabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Automatic session close at end of transaction: disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Statistics: disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Deleted entity synthetic identifier rollback: disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Default entity-mode: pojo 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Check Nullability in Core (should be disabled when Bean Validation is on): enabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Allow initialization of lazy state outside session : disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Using BatchFetchStyle : LEGACY 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Default batch fetch size: -1 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Maximum outer join fetch depth: null 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Default null ordering: NONE 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Order SQL updates by primary key: disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Order SQL inserts for batching: disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - multi-tenancy strategy : NONE 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - JTA Track by Thread: enabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Query language substitutions: {} 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Named query checking : enabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Second-level cache: disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Second-level query cache: disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Second-level query cache factory: null 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Second-level cache region prefix: null 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Optimize second-level cache for minimal puts: disabled 20:07:20.174 [main] DEBUG org.hibernate.cfg.Settings - Structured second-level cache entries: disabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - Second-level cache direct-reference entries: disabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - Automatic eviction of collection cache: disabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - JDBC batch size: 15 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - JDBC batch updates for versioned data: enabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - Scrollable result sets: enabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - Wrap result sets: disabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - JDBC3 getGeneratedKeys(): enabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - JDBC result set fetch size: null 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - Connection release mode: AFTER_TRANSACTION 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - Generate SQL with comments: enabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - JPA compliance - query : disabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - JPA compliance - closed-handling : disabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - JPA compliance - lists : disabled 20:07:20.175 [main] DEBUG org.hibernate.cfg.Settings - JPA compliance - transactions : disabled 20:07:20.237 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - Session factory constructed with filter configurations : {} 20:07:20.237 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - Instantiating session factory with properties: {sun.desktop=windows, awt.toolkit=sun.awt.windows.WToolkit, hibernate.format_sql=true, java.specification.version=1.8, file.encoding.pkg=sun.io, sun.cpu.isalist=amd64, sun.jnu.encoding=MS949, hibernate.dialect=org.hibernate.dialect.H2Dialect, java.class.path=C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\charsets.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\access-bridge-64.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\cldrdata.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\dnsns.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\jaccess.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\jfxrt.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\localedata.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\nashorn.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\sunec.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\sunjce_provider.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\sunmscapi.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\sunpkcs11.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext\zipfs.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jce.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jfr.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jfxswt.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jsse.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\management-agent.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\resources.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\rt.jar;C:\study-kimyounghan\ex1-hello-jpa\target\classes;C:\Users\zzaaq\.m2\repository\org\hibernate\hibernate-core\5.4.29.Final\hibernate-core-5.4.29.Final.jar;C:\Users\zzaaq\.m2\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;C:\Users\zzaaq\.m2\repository\javax\persistence\javax.persistence-api\2.2\javax.persistence-api-2.2.jar;C:\Users\zzaaq\.m2\repository\org\javassist\javassist\3.27.0-GA\javassist-3.27.0-GA.jar;C:\Users\zzaaq\.m2\repository\net\bytebuddy\byte-buddy\1.10.21\byte-buddy-1.10.21.jar;C:\Users\zzaaq\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\zzaaq\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.1.1.Final\jboss-transaction-api_1.2_spec-1.1.1.Final.jar;C:\Users\zzaaq\.m2\repository\org\jboss\jandex\2.2.3.Final\jandex-2.2.3.Final.jar;C:\Users\zzaaq\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\zzaaq\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Users\zzaaq\.m2\repository\org\dom4j\dom4j\2.1.3\dom4j-2.1.3.jar;C:\Users\zzaaq\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\zzaaq\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.1\jaxb-runtime-2.3.1.jar;C:\Users\zzaaq\.m2\repository\org\glassfish\jaxb\txw2\2.3.1\txw2-2.3.1.jar;C:\Users\zzaaq\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.7\istack-commons-runtime-3.0.7.jar;C:\Users\zzaaq\.m2\repository\org\jvnet\staxex\stax-ex\1.8\stax-ex-1.8.jar;C:\Users\zzaaq\.m2\repository\com\sun\xml\fastinfoset\FastInfoset\1.2.15\FastInfoset-1.2.15.jar;C:\Users\zzaaq\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;C:\Users\zzaaq\.m2\repository\com\h2database\h2\1.4.200\h2-1.4.200.jar;C:\Users\zzaaq\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\zzaaq\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\zzaaq\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.2\lib\idea_rt.jar, java.vm.vendor=Amazon.com Inc., sun.arch.data.model=64, user.variant=, java.vendor.url=https://aws.amazon.com/corretto/, user.timezone=Asia/Seoul, javax.persistence.jdbc.url=jdbc:h2:tcp://localhost/~/test, javax.persistence.jdbc.user=****, os.name=Windows 11, java.vm.specification.version=1.8, user.country=KR, sun.java.launcher=SUN_STANDARD, local.setting.IS_JTA_TXN_COORD=false, sun.boot.library.path=C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\bin, sun.java.command=JpaMain, hibernate.use_sql_comments=true, sun.cpu.endian=little, user.home=C:\Users\zzaaq, user.language=ko, java.specification.vendor=Oracle Corporation, java.home=C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre, file.separator=\, line.separator= , java.vm.specification.vendor=Oracle Corporation, java.specification.name=Java Platform API Specification, hibernate.transaction.coordinator_class=class org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, javax.persistence.jdbc.driver=org.h2.Driver, sun.boot.class.path=C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\resources.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\rt.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\sunrsasign.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jsse.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jce.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\charsets.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\jfr.jar;C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\classes, user.script=, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, java.runtime.version=1.8.0_382-b05, user.name=zzaaq, path.separator=;, hibernate.connection.username=****, os.version=10.0, java.endorsed.dirs=C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\endorsed, java.runtime.name=OpenJDK Runtime Environment, hibernate.connection.url=jdbc:h2:tcp://localhost/~/test, file.encoding=UTF-8, hibernate.ejb.persistenceUnitName=hello, java.vm.name=OpenJDK 64-Bit Server VM, hibernate.show_sql=true, hibernate.connection.driver_class=org.h2.Driver, java.vendor.url.bug=https://github.com/corretto/corretto-8/issues/, java.io.tmpdir=C:\Users\zzaaq\AppData\Local\Temp\, java.version=1.8.0_382, user.dir=C:\study-kimyounghan\ex1-hello-jpa, os.arch=amd64, java.vm.specification.name=Java Virtual Machine Specification, java.awt.printerjob=sun.awt.windows.WPrinterJob, hibernate.connection.password=****, sun.os.patch.level=, hibernate.boot.CfgXmlAccessService.key=org.hibernate.boot.registry.StandardServiceRegistryBuilder$1@2c1156a7, java.library.path=C:\Users\zzaaq\.jdks\corretto-1.8.0_382\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Zulu\zulu-8\bin\;C:\Program Files (x86)\VMware\VMware Player\bin\;C:\oraclexe\app\oracle\product\11.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files\MySQL\MySQL Server 8.0\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk-11.0.12\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\zzaaq\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\zzaaq\AppData\Local\Programs\Python\Python310\;C:\Users\zzaaq\AppData\Local\Microsoft\WindowsApps;C:\Users\zzaaq\.dotnet\tools;C:\Users\zzaaq\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\zzaaq\AppData\Local\Programs\Python\Python36-32\Scripts;"C:\Users\zzaaq\AppData\Local\Android\Sdk\emulator; C:\Users\zzaaq\AppData\Local\Android\Sdk\platform-tools; C:\Users\zzaaq\AppData\Local\Android\Sdk\tools;";;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.2\bin;;C:\Users\zzaaq\AppData\Roaming\npm;., java.vendor=Amazon.com Inc., java.vm.info=mixed mode, java.vm.version=25.382-b05, java.specification.maintenance.version=5, hibernate.bytecode.use_reflection_optimizer=false, sun.io.unicode.encoding=UnicodeLittle, java.ext.dirs=C:\Users\zzaaq\.jdks\corretto-1.8.0_382\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, javax.persistence.jdbc.password=****, java.class.version=52.0} 20:07:20.246 [main] DEBUG org.hibernate.secure.spi.JaccIntegrator - Skipping JACC integration as it was not enabled 20:07:20.247 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - Instantiated session factory 20:07:20.247 [main] DEBUG org.hibernate.type.spi.TypeConfiguration$Scope - Scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration@17fc391b] to SessionFactoryImpl [org.hibernate.internal.SessionFactoryImpl@50468873] 20:07:20.285 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - Not known whether passed class name [Member] is safe 20:07:20.285 [main] DEBUG org.hibernate.boot.internal.ClassLoaderAccessImpl - No temp ClassLoader provided; using live ClassLoader for loading potentially unsafe class : Member 20:07:20.434 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Static SQL for entity: Member 20:07:20.434 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Version select: /* get version Member */ select id from MEMBER where id =? 20:07:20.434 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Snapshot select: /* get current state Member */ select member_.id, member_.name as name2_0_ from MEMBER member_ where member_.id=? 20:07:20.434 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Insert 0: /* insert Member */ insert into MEMBER (name, id) values (?, ?) 20:07:20.434 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Update 0: /* update Member */ update MEMBER set name=? where id=? 20:07:20.434 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister - Delete 0: /* delete Member */ delete from MEMBER where id=? 20:07:20.453 [main] DEBUG org.hibernate.loader.plan.build.internal.spaces.QuerySpacesImpl - Adding QuerySpace : uid = <gen:0> -> org.hibernate.loader.plan.build.internal.spaces.EntityQuerySpaceImpl@5db4c359] 20:07:20.454 [main] DEBUG org.hibernate.persister.walking.spi.MetamodelGraphWalker - Visiting attribute path : name 20:07:20.455 [main] DEBUG org.hibernate.loader.plan.build.internal.FetchStyleLoadPlanBuildingAssociationVisitationStrategy - Building LoadPlan... 20:07:20.469 [main] DEBUG org.hibernate.loader.plan.exec.internal.LoadQueryJoinAndFetchProcessor - processing queryspace <gen:0> 20:07:20.475 [main] DEBUG org.hibernate.loader.plan.build.spi.LoadPlanTreePrinter - LoadPlan(entity=Member) - Returns - EntityReturnImpl(entity=Member, querySpaceUid=<gen:0>, path=Member) - QuerySpaces - EntityQuerySpaceImpl(uid=<gen:0>, entity=Member) - SQL table alias mapping - member0_ - alias suffix - 0_ - suffixed key columns - {id1_0_0_} 20:07:20.477 [main] DEBUG org.hibernate.loader.entity.plan.EntityLoader - Static select for entity Member [NONE]: select member0_.id as id1_0_0_, member0_.name as name2_0_0_ from MEMBER member0_ where member0_.id=? 20:07:20.510 [main] DEBUG org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator - No actions specified; doing nothing 20:07:20.510 [main] DEBUG org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator - No JtaPlatform was specified, checking resolver 20:07:20.511 [main] DEBUG org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformResolverInitiator - No JtaPlatformResolver was specified, using default [org.hibernate.engine.transaction.jta.platform.internal.StandardJtaPlatformResolver] 20:07:20.515 [main] DEBUG org.hibernate.engine.transaction.jta.platform.internal.StandardJtaPlatformResolver - Could not resolve JtaPlatform, using default [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 20:07:20.515 [main] INFO org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator - HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 20:07:20.516 [main] DEBUG org.hibernate.query.spi.NamedQueryRepository - Checking 0 named HQL queries 20:07:20.516 [main] DEBUG org.hibernate.query.spi.NamedQueryRepository - Checking 0 named SQL queries 20:07:20.523 [main] DEBUG org.hibernate.internal.SessionFactoryRegistry - Initializing SessionFactoryRegistry : org.hibernate.internal.SessionFactoryRegistry@62d363ab 20:07:20.526 [main] DEBUG org.hibernate.internal.SessionFactoryRegistry - Registering SessionFactory: 7fd1ddf4-17f5-407a-a853-d4504f40e72b (<unnamed>) 20:07:20.526 [main] DEBUG org.hibernate.internal.SessionFactoryRegistry - Not binding SessionFactory to JNDI, no JNDI name configured 20:07:20.575 [main] DEBUG org.hibernate.stat.internal.StatisticsInitiator - Statistics initialized [enabled=false] 20:07:20.580 [main] DEBUG org.hibernate.engine.transaction.internal.TransactionImpl - On TransactionImpl creation, JpaCompliance#isJpaTransactionComplianceEnabled == false 20:07:20.580 [main] DEBUG org.hibernate.engine.transaction.internal.TransactionImpl - begin 20:07:20.591 [main] DEBUG org.hibernate.hql.internal.QueryTranslatorFactoryInitiator - QueryTranslatorFactory: org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory@c074c0c 20:07:20.610 [main] DEBUG org.hibernate.hql.internal.ast.QueryTranslatorImpl - parse() - HQL: SELECT m FROM Member AS m 20:07:20.613 [main] ERROR org.hibernate.hql.internal.ast.ErrorTracker - line 1:15: unexpected token: Member 20:07:20.614 [main] ERROR org.hibernate.hql.internal.ast.ErrorTracker - line 1:15: unexpected token: Member antlr.NoViableAltException: unexpected token: Member at org.hibernate.hql.internal.antlr.HqlBaseParser.fromRange(HqlBaseParser.java:1666) at org.hibernate.hql.internal.antlr.HqlBaseParser.fromClause(HqlBaseParser.java:1465) at org.hibernate.hql.internal.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java:1165) at org.hibernate.hql.internal.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:825) at org.hibernate.hql.internal.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:336) at org.hibernate.hql.internal.antlr.HqlBaseParser.statement(HqlBaseParser.java:200) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:294) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:189) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:144) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:113) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:73) at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:162) at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:613) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:725) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:825) at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:23) at JpaMain.main(JpaMain.java:35) 20:07:20.616 [main] DEBUG org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl - JDBC transaction marked for rollback-only (exception provided for stack trace) java.lang.Exception: exception just for purpose of providing stack trace at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.markRollbackOnly(JdbcResourceLocalTransactionCoordinatorImpl.java:324) at org.hibernate.engine.transaction.internal.TransactionImpl.markRollbackOnly(TransactionImpl.java:203) at org.hibernate.internal.AbstractSharedSessionContract.markForRollbackOnly(AbstractSharedSessionContract.java:405) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:733) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:825) at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:23) at JpaMain.main(JpaMain.java:35) 20:07:20.619 [main] DEBUG org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl - JDBC transaction marked for rollback-only (exception provided for stack trace) java.lang.Exception: exception just for purpose of providing stack trace at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.markRollbackOnly(JdbcResourceLocalTransactionCoordinatorImpl.java:324) at org.hibernate.engine.transaction.internal.TransactionImpl.markRollbackOnly(TransactionImpl.java:203) at org.hibernate.internal.AbstractSharedSessionContract.markForRollbackOnly(AbstractSharedSessionContract.java:405) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:191) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:830) at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:23) at JpaMain.main(JpaMain.java:35) 20:07:20.619 [main] DEBUG org.hibernate.engine.transaction.internal.TransactionImpl - rolling back 20:07:20.620 [main] DEBUG org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl - Initiating JDBC connection release from afterTransaction 20:07:20.620 [main] DEBUG org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl - Initiating JDBC connection release from afterTransaction 20:07:20.622 [main] DEBUG org.hibernate.internal.SessionFactoryImpl - HHH000031: Closing 20:07:20.623 [main] DEBUG org.hibernate.type.spi.TypeConfiguration$Scope - Un-scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration$Scope@315df4bb] from SessionFactory [org.hibernate.internal.SessionFactoryImpl@50468873] 20:07:20.623 [main] DEBUG org.hibernate.service.internal.AbstractServiceRegistryImpl - Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries 20:07:20.623 [main] INFO org.hibernate.orm.connections.pooling - HHH10001008: Cleaning up connection pool [jdbc:h2:tcp://localhost/~/test] 20:07:20.624 [main] DEBUG org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl - Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries Process finished with exit code 0
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
EC2 중지후 재시작시 기존배포 애플리케이션에 대한 문의
EC2 중지후 다시 인스턴스를 실행 했는데 퍼블릭 ip주소가 바꼈습니다.그래서 다시 인스턴스 실행후 바뀐 퍼블릭 ip주소로 접속을 시도했는데보안설정도 그대로인데 접속이 안되서 보니 빌드 디렉토리는 존재하는데빌드 실행이 안된상태이고 어플리케이션도 종료가 되있는 상태였습니다 다시 빌드후 어플리케이션 재실행으로현재는 접속이 가능한 상태이지만 혹시 일레스틱을 사용하지 않는 경우나도메인을 따로 구입하지 않은경우에는인스턴스 중지후 재실행시 항상 이러한 절차를 거쳐야 하는건가요?
-
미해결Java/Spring 테스트를 추가하고 싶은 개발자들의 오답노트
문제로 남겨주신 uuid에 대한 코드는 없는건가요 ?
UUID에 대해 제가 작성한 로직의 방향이 맞는지 확인해 보고싶은데, 문제관련 코드는 어디에 있나요 ?
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
hasIpAddress(), getRemoteAddr() 질문입니다.
이전에 이런 질문들((https://www.inflearn.com/questions/423204))이 있던 것을 확인하였으나 저는 해결이 되지 않아 질문을 남깁니다.postman으로 회원가입하고 로그인하려고 하면 401 Unauthorized가 나며 많이 보셨을 이런 에러가 나옵니다.java.lang.UnsupportedOperationException: public abstract java.lang.String javax.servlet.ServletRequest.getRemoteAddr() is not supported....이와 같은 에러의 질문과 답변을 보고 hasIpAddress()에서 .access("hasIpAddress('" + IP + "')")로 바꿔서 해보았는데도 또는 스프링 부트 버전을 바꾸어 시도해(2.6.2, 2.4.2 등)보았으나 해결이 되지 않아 질문을 드립니다.처음 설정한 spring boot 버전은 2.7.15입니다.build.gradleplugins { id 'java' id 'org.springframework.boot' version '2.7.15' id 'io.spring.dependency-management' version '1.0.15.RELEASE' } group = 'com.example' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '11' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } ext { set('springCloudVersion', "2021.0.8") } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'com.h2database:h2:1.3.176' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.modelmapper:modelmapper:3.1.1' implementation 'org.springframework.boot:spring-boot-starter-security' testImplementation 'org.springframework.security:spring-security-test' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' } dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" } } tasks.named('test') { useJUnitPlatform() } WebSecurity은@Configuration @EnableWebSecurity public class WebSecurity extends WebSecurityConfigurerAdapter { private final Environment environment; private final UserService userService; private final BCryptPasswordEncoder bCryptPasswordEncoder; private String IP = "192.168.1.2"; @Autowired public WebSecurity(Environment environment, UserService userService, BCryptPasswordEncoder bCryptPasswordEncoder) { this.environment = environment; this.userService = userService; this.bCryptPasswordEncoder = bCryptPasswordEncoder; } @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable(); http.authorizeRequests() .antMatchers("/**") // .hasIpAddress(IP) .access("hasIpAddress('" + IP + "')") .and() .addFilter(getAuthenticationFilter()); http.headers().frameOptions().disable(); } private AuthenticationFilter getAuthenticationFilter() throws Exception { AuthenticationFilter authenticationFilter = new AuthenticationFilter(authenticationManager(), userService, environment); return authenticationFilter; } // db password와 input password 비교 @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userService).passwordEncoder(bCryptPasswordEncoder); } }2.7 이후 버전에서는 https://www.inflearn.com/chats/789887와 같이 WebSecurityConfigurerAdapter 를 상속하지 않고 configure함수 오버라이드 대신 SecurityFilterChain을 사용해보았으나 이렇게 해도 되지 않았습니다.AuthenticationFilter에 unsuccessfulAuthentication를 오버라이드하여 확인해본 결과org.springframework.security.authentication.BadCredentialsException: 자격 증명에 실패하였습니다. at org.springframework.security.authentication.dao.DaoAuthenticationProvider.additionalAuthenticationChecks(DaoAuthenticationProvider.java:80) at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:147) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:201) at com.example.userservice.filter.AuthenticationFilter.attemptAuthentication(AuthenticationFilter.java:46)라고 오류가 나오는 것을 확인했습니다.AuthenticationFilter.java:46 부분은 return getAuthenticationManager().authenticate( 부분 입니다.AuthenticationFilter 코드는 다음과 같습니다.@Slf4j public class AuthenticationFilter extends UsernamePasswordAuthenticationFilter { private final UserService userService; private final Environment environment; public AuthenticationFilter(AuthenticationManager authenticationManager, UserService userService, Environment environment) { super.setAuthenticationManager(authenticationManager); this.userService = userService; this.environment = environment; } @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { try { RequestLogin creds = new ObjectMapper().readValue(request.getInputStream(), RequestLogin.class); return getAuthenticationManager().authenticate( new UsernamePasswordAuthenticationToken( creds.getEmail(), creds.getPassword(), new ArrayList<>() ) ); } catch (IOException e) { throw new RuntimeException(e); } } @Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException { // log.debug(((User)authResult.getPrincipal()).getUsername()); String userName = ((User)authResult.getPrincipal()).getUsername(); UserDto userDetails = userService.getUserDetailsByEmail(userName); System.out.println("details :" + userDetails); String token = Jwts.builder() .setSubject(userDetails.getUserId()) .setExpiration( new Date((System.currentTimeMillis() + Long.parseLong(environment.getProperty("token.expiration_time")))) ) .signWith(SignatureAlgorithm.HS512, environment.getProperty("token.secret")) .compact(); System.out.println("token :" + token); response.addHeader("token", token); response.addHeader("userId", userDetails.getUserId()); } @Override protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException, ServletException { // super.unsuccessfulAuthentication(request, response, failed); failed.printStackTrace(); } } 어느 부분을 어떻게 수정하여 진행을 해야 할까요? AuthenticationFilter에서 attemptAuthentication 함수를 UsernamePasswordAuthenticationToken 받는 것으로 수정하여 디버깅해보니 아래 코드의 authenticationToken 값은 잘 나옵니다. 그런데 위의 질문처럼 getAuthenticationManager().authenticate 여기서 문제가 발생합니다.문제가 발생하는 부분은 AbstractAuthenticationProcessingFilter의 저 부분으로 잡히며AuthenticationFilter 코드는 다음과 같습니다.import com.example.userservice.dto.UserDto; import com.example.userservice.service.UserService; import com.example.userservice.vo.RequestLogin; import com.fasterxml.jackson.databind.ObjectMapper; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import lombok.extern.slf4j.Slf4j; import org.springframework.core.env.Environment; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.userdetails.User; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; import java.util.Date; @Slf4j public class AuthenticationFilter extends UsernamePasswordAuthenticationFilter { private final UserService userService; private final Environment environment; public AuthenticationFilter(AuthenticationManager authenticationManager, UserService userService, Environment environment) { super.setAuthenticationManager(authenticationManager); this.userService = userService; this.environment = environment; } @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { try { RequestLogin creds = new ObjectMapper().readValue(request.getInputStream(), RequestLogin.class); UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken( creds.getEmail(), creds.getPassword(), new ArrayList<>()); return getAuthenticationManager().authenticate(authenticationToken); } catch (IOException e) { throw new RuntimeException(e); } } @Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException { // log.debug(((User)authResult.getPrincipal()).getUsername()); String userName = ((User)authResult.getPrincipal()).getUsername(); UserDto userDetails = userService.getUserDetailsByEmail(userName); System.out.println("details :" + userDetails); String token = Jwts.builder() .setSubject(userDetails.getUserId()) .setExpiration( new Date((System.currentTimeMillis() + Long.parseLong(environment.getProperty("token.expiration_time")))) ) .signWith(SignatureAlgorithm.HS512, environment.getProperty("token.secret")) .compact(); System.out.println("token :" + token); response.addHeader("token", token); response.addHeader("userId", userDetails.getUserId()); } // @Override // protected void unsuccessfulAuthentication(HttpServletRequest request, // HttpServletResponse response, // AuthenticationException failed) throws IOException, ServletException { //// super.unsuccessfulAuthentication(request, response, failed); // failed.printStackTrace(); // } } 해결 방법 좀 알려주시면 감사하겠습니다.
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
default_batch_fetch_size: 100 으로 설정을 해줘도 쿼리가 한번에 가져오지 않습니다.
@GetMapping("api/v2/orders/{id}") // batch_fetch_size 검색용 public ResultMany findByBatchFetch(@PathVariable("id") Long id) { Customer customer = customerService.findCustomerById(id); List<Order> orders = orderRepository.findAllOrder(); return getOrderDtoList(orders); } public List<Order> findAllOrder() { return em.createQuery("select o from Order o", Order.class) .getResultList(); } private ResultMany getOrderDtoList(List<Order> orders) { List<OrderDto> orderDtos = orders.stream() .map(o -> new OrderDto(o)) .collect(Collectors.toList()); return new ResultMany<>(orders.size(), orderDtos); } @Data static class OrderDto { private Long id; private CustomerDto customer; private List<DiffuserProductRequestDto> diffuserProductRequest; public OrderDto (Order order) { id = order.getId(); customer = new CustomerDto(order.getCustomer()); diffuserProductRequest = order.getDiffuserProductRequests().stream() .map(diff -> new DiffuserProductRequestDto(diff)) .collect(Collectors.toList()); } } @Data static class DiffuserProductRequestDto { private Long id; private DiffuserDto diffuser; private int amount; private Deadline deadline; private ProductionStatus status; public DiffuserProductRequestDto (DiffuserProductRequest diffuserProductRequest) { id = diffuserProductRequest.getId(); diffuser = new DiffuserDto(diffuserProductRequest.getDiffuser()); amount = diffuserProductRequest.getAmount(); deadline = diffuserProductRequest.getDeadline(); status = diffuserProductRequest.getStatus(); } } 위에는 order클래스 연관된 클래스를 찾기위한 코드들인데 제가 27개의 오더를 만들고 get요청을 보내면 default_batch_fetch_size: 100으로 설정 해놓았기 때문에 27개를 한번에 가져올 것이라고 생각하고 있는데 결과는 그렇지 않습니다이렇게 두번의 쿼리로 찾아오는데 어떤게 문제인걸까요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
상품 수정부분에서 에러가 발생하는것 같습니다..
[질문 내용]섹션7의 상품수정 부분을 수강중입니다!강사님의 코드를 그대로 따라 쳤으나 상품 수정시 에러가 발생하는데 원인을 모르겠습니다. 다만, 아래와 같이 에러페이지가 나오나 홈으로 가서 다시 상품목록을 보면 수정이 반영되어었습니다... package jpabook.jpashop.controller; import jpabook.jpashop.domain.item.Book; import jpabook.jpashop.domain.item.Item; import jpabook.jpashop.service.ItemService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import java.util.List; @Controller @RequiredArgsConstructor public class ItemController { private final ItemService itemService; @GetMapping("/items/new") public String createForm(Model model) { model.addAttribute("form", new BookForm()); return "items/createItemForm"; } @PostMapping("/items/new") public String create(BookForm form) { Book book = new Book(); book.setName(form.getName()); book.setPrice(form.getPrice()); book.setStockQuantity(form.getStockQuantity()); book.setAuthor(form.getAuthor()); book.setIsbn(form.getIsbn()); itemService.saveItem(book); return "redirect:/"; } @GetMapping("/items") public String list(Model model) { List<Item> items = itemService.findItem(); model.addAttribute("items", items); return "items/itemList"; } @GetMapping("items/{itemId}/edit") public String updateItemForm(@PathVariable("itemId") Long itemId, Model model) { Book item = (Book) itemService.findOne(itemId); BookForm form = new BookForm(); form.setId(item.getId()); form.setName(item.getName()); form.setPrice(item.getPrice()); form.setStockQuantity(item.getStockQuantity()); form.setAuthor(item.getAuthor()); form.setIsbn(item.getIsbn()); model.addAttribute("form", form); return "items/updateItemForm"; } @PostMapping("items/{itemId}/edit") public String updateItem(@PathVariable String itemId, @ModelAttribute("form") BookForm form) { Book book = new Book(); book.setId(form.getId()); book.setName(form.getName()); book.setPrice(form.getPrice()); book.setStockQuantity(form.getStockQuantity()); book.setAuthor(form.getAuthor()); book.setIsbn(form.getIsbn()); itemService.saveItem(book); return "redirect:items"; } }package jpabook.jpashop.controller; import lombok.Getter; import lombok.Setter; @Getter @Setter public class BookForm { private Long id; private String name; private int price; private int stockQuantity; private String author; private String isbn; }
-
미해결실전! 스프링 데이터 JPA
findById 쿼리 질문
@Test public void findMemberLazy(){ //given //member1 -> teamA //member2 -> teamB Team teamA = new Team("teamA"); Team teamB = new Team("teamB"); teamRepository.save(teamA); teamRepository.save(teamB); memberRepository.save(new Member("member1", 10, teamA)); memberRepository.save(new Member("member2", 20, teamB)); //when Optional<Member> byId = memberRepository.findById(1L); }위와 같은 코드가 있을때 memberRepository.findById(1L); 를 하면 저는 em.find를 통해서 영속성컨테스트를 조회하기 때문에 select쿼리가 안나간다고 생각이 들었습니다.하지만 출력결과 select m1_0.member_id, m1_0.age, m1_0.team_id, m1_0.username from member m1_0 where m1_0.member_id=?select 쿼리가 나가는 것을 확인했습니다.https://www.inflearn.com/questions/1014206/%EA%B0%99%EC%9D%80-pk%EB%A1%9C-%EC%A1%B0%ED%9A%8C%EC%8B%9C-%EC%BF%BC%EB%A6%AC%EA%B0%80-2%EB%B2%88-%EB%82%98%EA%B0%80%EB%8A%94-%EC%9D%B4%EC%9C%A0제 예전 질문에서는 JpaRepository에서의 Method Naming Query의 경우 JPQL로 조회를 하기 때문에 실행전 em.flush()가 일어나서 Direct로 DB에 쿼리가 날아가고 findById는 JpaRepository Interface의 target인 SimpleJpaRepository에 있기 때문에 em.find를 한다고 보았는데 왜 select 쿼리가 나갔는지 궁금합니다.
-
해결됨실전! Querydsl
Querydsl 배포시 질문입니다.
plugins { id 'java' id 'org.springframework.boot' version '3.0.2' id 'io.spring.dependency-management' version '1.1.0' id "com.ewerk.gradle.plugins.querydsl" version "1.0.10" } //querydsl 추가 시작 def querydslDir = "$buildDir/generated/querydsl" querydsl { jpa = true querydslSourcesDir = querydslDir } sourceSets { main.java.srcDir querydslDir } compileQuerydsl{ options.annotationProcessorPath = configurations.querydsl } configurations { compileOnly { extendsFrom annotationProcessor } querydsl.extendsFrom compileClasspath } //querydsl 추가 끝 강의 들을 때는 아래와 같이 Gradle에 q파일 위치를 설정을 해 주었는데요이대로 배포를 진행하게 되면 실제 배포 단계에서는 문제가 발생합니다. 따라서 아래 링크를 찾아서 확인해 보았는데 이 경우는 배포가 문제 없이 잘 되었습니다https://www.inflearn.com/questions/787440/querydsl-gradle-%EC%B6%94%EA%B0%80%ED%9B%84-%EB%8D%94%EB%B8%94%ED%81%B4%EB%A6%AD%ED%95%98%EC%97%AC-%EC%8B%A4%ED%96%89%ED%95%A0%EB%95%8C-%EC%98%A4%EB%A5%98.아래는 배포 문제없이 진행된 gradle 입니다. plugins { id 'java' id 'org.springframework.boot' version '3.0.2' id 'io.spring.dependency-management' version '1.1.0' } group = 'study' version = '0.0.1-SNAPSHOT' sourceCompatibility = '17' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.6' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' //Querydsl 추가 implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta" annotationProcessor "jakarta.annotation:jakarta.annotation-api" annotationProcessor "jakarta.persistence:jakarta.persistence-api" } tasks.named('test') { useJUnitPlatform() } clean { delete file('src/main/generated') } 확인을 해 보면 QueryDsl 플러그인이 지워져 있고, q파일이 빌드 되는 위치를 따로 지정하지 않는 것 같습니다. 이렇게 할 경우 배포는 가능하지만 CompileQuerydsl 을 찾을 수가 없어서 Q파일 생성이 불가능 합니다.개발 시의 Gradle과 배포시 Gradle을 다르게 가져가는 것 말고는 방법이 없을까요?
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
OSIV OFF시 Sercice클래스 최적화
orderService.class를 예를들면 Order Entity를 저장하거나 find하거나 등 entity위주의 코드만 뒀습니다.허나 Order Entity뿐만 아니라 OrderForm, OrderDto를 변환해주는 코드가 필요하다면 각 형태를 변화해주는 Service를 따로 만들어야하는지 아님 하나의 Service클래스안에 다 둬야 하는지 궁금합니다.예로들어 OrderEntity => OrderForm 로바꿔주는서비스, OrderEntity => OrderDto로 바꿔주는 서비스,OrderEntity를 repository에 넘겨주는(DB에 저장하는) 서비스 이런식으로 각각 나눠서 여러개의 클래스로 만들어주나요??
-
미해결스프링 DB 2편 - 데이터 접근 활용 기술
RowMapper<Item> 질문있습니다.
수업에 나오는 RowMapper<Item>에 대해서 질문드립니다.RowMapper의 코드를 확인해보니@FunctionalInterface public interface RowMapper<T> { /** * Implementations must implement this method to map each row of data * in the ResultSet. This method should not call {@code next()} on * the ResultSet; it is only supposed to map values of the current row. * @param rs the ResultSet to map (pre-initialized for the current row) * @param rowNum the number of the current row * @return the result object for the current row (may be {@code null}) * @throws SQLException if an SQLException is encountered getting * column values (that is, there's no need to catch SQLException) */ @Nullable T mapRow(ResultSet rs, int rowNum) throws SQLException; }강의에서 구현한 (rs, rowNum) => T 의 메서드가 보이는데요 해당 메서드는 throws SQLException, 즉 체크 예외를 던지고있습니다. 검색해본결과 람다는 컴파일타임이 아니라 런타임에 실행되기 때문에 사용하는측에서 컴파일시점에 예외체크를 하지않아도 컴파일이 통가된다라고 보았습니다. (throws SQLException 라고 적혀있는데 컴파일타임에 체크되어야하는거 아닌가 라고 생각은 하면서) 질문그렇다면 제가 jdbc의 RowMapper를 실무에서 사용한다면 매번 체크 예외를 위한 예외처리를 매번 다 해줘야한다는 의미인가요?
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
일대일 매핑 질문
안녕하세요 일대일 매핑 강의를 듣던 중에 '외래키에 null 허용'이라는 부분이 이해가 잘 안돼서 질문드립니다. 어느 연관관계든, 예를 들어 유저한명이 게시글을 여러개쓴다고 하면 다대일 관계로 매핑할 수 있는데 그러면 유저가 게시글을 하나도 작성하지 않아도 null이 되는거 아닌가요? 그리고 대상 테이블에 외래키를 뒀을 때 '외래키에 null 허용'이 해결된다는 점도 잘 모르겠습니다. 제가 어떤 부분을 이해 못하고 있는지 모르겠어서 질문드려요.
-
해결됨자바 ORM 표준 JPA 프로그래밍 - 기본편
IDENTITY 전략에서 1차 캐시에 entity가 저장되는 시점은 언제인가요?
4.6.2 IDENTITY 키 생성 전략에서 1차 캐시에 저장할 때는 기본키가 반드시 필요하기 때문에 em.persist()를 호출하는 시점에 바로 DB에 INSERT SQL 이 실행된다고 적혀있습니다.그리고 Statement.getGeneratedKeys()를 사용해서 데이터 저장과 동시에 기본 키값을 얻어올 수 있습니다.그렇다면, 1차 캐시에는 DB에 INSERT SQL이 실행된 직후 entity가 저장되는건가요?아니면, em.find()를 하는 시점에 1차 캐시에 entity가 저장되는 걸까요?아래 사진에서 왼쪽일까요, 오른쪽일까요?
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
t.members 값 확인이 되지 않습니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]String query = "select t.members From Team t";Collection result = em.createQuery(query, Collection.class).getResultList();System.out.println("result = " + result); 결과값result = [hellojpa.Domain.Member@5b7aa898, hellojpa.Domain.Member@4e642ee1]위와 같은 코드로 출력했는데 영상과 같이 리스트의 값이 나오지 않고 get 메소드도 사용도지 않아서 원하는 값들이 제대로 출력되는지 확인이 되지 않는데 왜그런건가요?혹시 엔티티 설계할때 잘못했나 싶어서 아래에 엔티티 코드 남김니다.@Entitypublic class Member {@Id @GeneratedValue @Column(name = "MEMBER_ID")private Long id; private String username; private int age; @ManyToOne @JoinColumn(name = "TEAM_ID")private Team team;ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ@Entitypublic class Team {@Id @GeneratedValue @Column(name = "TEAM_ID")private Long id; private String name; @OneToMany(mappedBy = "team")private List<Member> members = new ArrayList<>();