IT'S DO
728x90

# 데이터에 따라 해당 메뉴 안보이게 처리 할 때 사용(1)

https://readmeplz.tistory.com/58

if에 따라 권한 넣는것과 해당 view.bid로 값 보내 주는 것 알 수 있는 자료

 

게시판만들기 8-6 로그인세션

이제 로그인과 게시판을 연동해서 로그인된 id를 user로 칭하고 user을 이용해서 여러 기능을 구현해보려 한다. 로그인과 게시판을 연동해서 실행할 수 있는 기능은 글쓰기, 답글쓰기 --> 로그인한

readmeplz.tistory.com

 

 

c:if 테스트로

<c:forEach var="result" items="${resultList}" varStatus="status">
    <tr style="text-align:center;">
        <td><c:out value="${result.cs_idx}"/></td>                    
        <td><c:out value="${result.cs_type}"/></td>
        <td><c:out value="${result.cs_area}"/></td>
        <td>    
        <c:if test="${result.cs_open eq 'N'}" >
            <img src="${pageContext.request.contextPath}/img/bbs/icn_security.png" alt="비밀글" />
            <c:choose>
                <c:when test="${result.me_fkid eq loginVO.id || admincode eq '1'}">
                    <c:out value="${result.cs_title}"/>
                </c:when>
                <c:otherwise>비밀글은 작성자와 관리자만 볼 수 있습니다.</c:otherwise>
            </c:choose>
        </c:if>
        <c:if test="${result.cs_open eq 'Y'}" >
            <c:out value="${result.cs_title}"/>
        </c:if>
        </td>
        <%-- <td><c:out value="${result.cs_title}"/></td> --%>
        <td><c:out value="${result.cs_biz}"/></td>            
        <td><c:out value="${result.cs_leader_name}"/></td>            
        <td><c:out value="${result.cs_expertmb}"/></td>
        <td><c:out value="${result.cs_regdate}"/></td>            
        <td><c:out value="${result.cs_state}"/></td>            
    </tr>
</c:forEach>

 

# insert 값 여러개 할 때 사용 (2)

insert 여러개

https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=dktmrorl&logNo=222012420626 

 

[Java] Spring Boot - JPA 여러 Insert를 하나로 묶어 한번에 처리하는 방법

Spring Data JPA - saveAll() 여러 데이터를 저장하기 위해 for문을 돌면서 각각 JPA Repository...

blog.naver.com

 

구현법 찾아야함.

 


JpaRepository가 제공하는 메서드 중에서 컬렉션 save 기능을 하는  saveAll(List<T> list) 가 원하시는 스펙일지 모르겠네요.



List<String>의 태그를 Java Stream API를 이용하여 List<TagEntity> 컬렉션으로 변경해서 saveAll의 인자로 넘기면 save를 반복해서 호출 할 필요 없이 간결하게 사용할 수 있습니다.



다만, 대량 삽입(bulk insert)에 대한 최적화 부분에 대해서는 JpaRepository의 기본 제공 쿼리 메소드로는 한계가 있을 수 있습니다.  

 

 

여러번 호출 

https://sas-study.tistory.com/388

 

[Spring Data JPA] save와 saveAll의 성능 차이에 대한 실험과 결과!(스프링 프록시, @Transactional)

안녕하세요. 오늘은 Spring Data JPA를 활용할때 기본 Insert로 사용하는 save 기능과 saveAll 기능에 대한 성능 실험을 해보려고 합니다. Spring Data JPA의 경우 Bulk Insert의 경우 많은 성능 이슈를 발생시켜..

sas-study.tistory.com

 

# 팝업 리스트 값을 부모창으로 보내기 (3)

참여자 페이지 만들고 보낼 때 사용하기

https://chobopark.tistory.com/5

 

[Spring]팝업 리스트 값을 부모창에 전달하는 방법 (영상 有)

[2021년 09월 30일에 수정하였습니다] 많이들 사용하는 팝업에서 리스트 체크값을 부모창에 전달하는 방법에 대해 이야기해보겠습니다. 전에 작성했던 페이지 내용이 많이 부실해서 새로 작성하

chobopark.tistory.com

 

# 약간 종합적인것 1번과 유사 (4)

<c:if test="${loginUserBean.user_idx == contentBean.content_writer_idx }"> <a href="${root }board/update?board_info_idx=${board_info_idx}&content_idx=${content_idx}" class="btn btn-info">수정하기</a> <a href="${root }board/delete?board_info_idx=${board_info_idx}&content_idx=${content_idx}" class="btn btn-danger">삭제하기</a> </c:if>

 

https://chosh95.tistory.com/290

 

[프로젝트] 글 수정 - 작성 권한 처리

글 수정 기능을 구현할 것이다. 우선 수정과 삭제 버튼은 로그인한 사람과 작성한 사람이 같은 경우에만 노출해야 한다. board controller와 board/read.jsp를 수정하자. mapper의 getContent 쿼리문에서 content

chosh95.tistory.com

 

 

 

 

 

 

# 나중에 해보기 값타입 (그냥 적어놓음)

https://lifedeveloper.tistory.com/entry/JPA%EA%B0%92%ED%83%80%EC%9E%85-%EC%BB%AC%EB%A0%89%EC%85%98-ElementCollectionCollectionTable

 

다 Entity 객체 타입이다.

 

값타입 컬렉션은 진짜 정말 단순한거 저장하거나 할때 사용. 추적 필요없을때 사용하는거임.

출처: https://lifedeveloper.tistory.com/entry/JPA값타입-컬렉션-ElementCollectionCollectionTable [Life Developer:티스토리]

 

 

profile

IT'S DO

@멋진놈

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!