소개
게시글
질문&답변
2022.03.16
vue cli 버전이 4이상인 경우에는 어떻게 해야될지 모르겠어요.
Most of Vue Router API has remained unchanged during its rewrite from v3 (for Vue 2) to v4 (for Vue 3) vue3 는 vue router 4 버전을 사용해야하고, vue2는 vue router 3버전을 사용해야 하는것 같습니다. 참고하세요!
- 2
- 6
- 610
질문&답변
2022.03.10
transition enter
vue3가 기본버전으로 바뀌면서 vue transition을 구글로 검색하면 맨 첫 번째 검색결과는 3버전 문서가 나오네요 2버전은 아래 url을 참고하면 좋을것 같습니다! https://v2.vuejs.org/v2/guide/transitions.html https://v2.vuejs.org/v2/guide/transitions.html#List-Entering-Leaving-Transitions
- 7
- 2
- 222
질문&답변
2022.03.07
scf 작동이 안됩니다.
요기 참고해도 좋겟네요! https://vuejs.github.io/vetur/guide/snippet.html
- 1
- 4
- 279
질문&답변
2020.03.16
findAll() 메서드
아 답변감사합니다. jpql을 사용한다니 신기하네요. 궁금한게 있는데요 기선님은 저런내용을 어떻게 아시는거에요? jpa도큐먼트를 보면 나오나요?? 혹시 url이있다면 좀 알려주실수 있을까요 ㅎ 저도 나중에 궁금하거나 이해안되는 부분이 있으면 스스로 답을 찾고싶어서 여쭤봅니다 :) 그리고 유투브를 통해 새로운 강의가 나온다고 들었습니다. 기대되네요~ㅎㅎ
- 0
- 5
- 221
질문&답변
2020.03.07
findAll() 메서드
네 답변 주셔서 감사합니다. 먼저 기분나쁘셨다면 사과드릴게요ㅠㅠ 그리고 이 질문이 스프링 데이터 JPA 2. JpaRepository.save() 메소드 이 강의에 되어있는지 잘 모르겠네요 다른데서 질문을 남긴것 같은데ㅠㅠ 아마 스프링 데이터 JPA 7.EntityGraph 강의에 질문을 남겼던것 같습니다... 이 강의의 질문에 보면 3개중에 2개가 답변이 없어서 답변이 잘 안 달리나보다 생각했습니다ㅠㅠ 좋은강의 잘듣고 있어서 감사한데 기분나쁘게 해서 죄송해여ㅠㅠ 제가 3가지를 해봤는데요 ManyToOne으로 fetch 전략을 1)default로 한경우 2)LAZY로 한경우 3)EAGER로 한경우로 해봤습니다. 1)fetch전략을 default로 한경우 - findAll() : lazy로 동작, findById() : EAGER로 동작 2)fetch전략을 lazy로 한경우 - findAll() : lazy로 동작, findById() : lazy로 동작 3)fetch전략을 eager로 한경우 - findAll() : lazy로 동작, findById() : eager로 동작 아래 코드랑 결과도 작성해 드립니다.. 혹시 제가 잘못 설정해서 그런것이 있다면 지적해주시고 알려주시면 감사드리겠습니다. ================코드=================== package com.hong.springjpa4 ; import lombok. Getter ; import lombok. Setter ; import javax.persistence. Entity ; import javax.persistence. GeneratedValue ; import javax.persistence. Id ; @Getter @Setter @Entity public class Post { @Id @GeneratedValue private Long id ; private String title ; } package com.hong.springjpa4 ; import lombok. Getter ; import lombok. Setter ; import javax.persistence.* ; @Entity @Getter @Setter public class Comment { @Id @GeneratedValue private Long id ; private String comment ; // @ManyToOne(fetch = FetchType.EAGER) @ManyToOne private Post post ; private int up ; private int down ; private boolean best ; } package com.hong.springjpa4 ; import org.springframework.data.jpa.repository.JpaRepository ; public interface CommentRepository extends JpaRepository , Long> { } package com.hong.springjpa4 ; import org.junit. Test ; import org.junit.runner. RunWith ; import org.springframework.beans.factory.annotation. Autowired ; import org.springframework.boot.test.autoconfigure.orm.jpa. DataJpaTest ; import org.springframework.test.context.junit4.SpringRunner ; import static org.junit.Assert.* ; @RunWith (SpringRunner. class ) @DataJpaTest public class CommentRepositoryTest { @Autowired CommentRepository commentRepository ; @Test public void findTest (){ System. out .println( "findAll() ================" ) ; commentRepository .findAll() ; System. out .println( "findById() ================" ) ; commentRepository .findById( 1l ) ; } } ================결과=================== 1)fetch를 defualt 로 한경우 결과 findAll() ================ Hibernate: select comment0_.id as id1_0_, comment0_.best as best2_0_, comment0_.comment as comment3_0_, comment0_.down as down4_0_, comment0_.post_id as post_id6_0_, comment0_.up as up5_0_ from comment comment0_ findById() ================ Hibernate: select comment0_.id as id1_0_0_, comment0_.best as best2_0_0_, comment0_.comment as comment3_0_0_, comment0_.down as down4_0_0_, comment0_.post_id as post_id6_0_0_, comment0_.up as up5_0_0_, post1_.id as id1_1_1_, post1_.title as title2_1_1_ from comment comment0_ left outer join post post1_ on comment0_.post_id=post1_.id where comment0_.id=? 2)fetch전략을 lazy로 한경우 결과 findAll() ================ Hibernate: select comment0_.id as id1_0_, comment0_.best as best2_0_, comment0_.comment as comment3_0_, comment0_.down as down4_0_, comment0_.post_id as post_id6_0_, comment0_.up as up5_0_ from comment comment0_ findById() ================ Hibernate: select comment0_.id as id1_0_0_, comment0_.best as best2_0_0_, comment0_.comment as comment3_0_0_, comment0_.down as down4_0_0_, comment0_.post_id as post_id6_0_0_, comment0_.up as up5_0_0_ from comment comment0_ where comment0_.id=? 3)fetch 전략을 eager로 한경우 결과 findAll() ================ Hibernate: select comment0_.id as id1_0_, comment0_.best as best2_0_, comment0_.comment as comment3_0_, comment0_.down as down4_0_, comment0_.post_id as post_id6_0_, comment0_.up as up5_0_ from comment comment0_ findById() ================ Hibernate: select comment0_.id as id1_0_0_, comment0_.best as best2_0_0_, comment0_.comment as comment3_0_0_, comment0_.down as down4_0_0_, comment0_.post_id as post_id6_0_0_, comment0_.up as up5_0_0_, post1_.id as id1_1_1_, post1_.title as title2_1_1_ from comment comment0_ left outer join post post1_ on comment0_.post_id=post1_.id where comment0_.id=?
- 0
- 5
- 221