본문 바로가기

스프링과 JPA 기반 웹 어플리케이션 개발85

49. 스터디 조회 타임리프 Variable Expression에서 객체의 메소드 호출 가능 th:if="${study.isManager(#authentication.principal)}" StudyRepository에 스터디 URL로 스터디를 조회하는 메소드 추가 package me.weekbelt.studyolle.study; @Transactional(readOnly = true) public interface StudyRepository extends JpaRepository { // ..... Study findByPath(String path); } 스터디 조회 요청을 받는 핸들러 작성 package me.weekbelt.studyolle.study; @RequiredArgsConstructor @Controll.. 2020. 4. 23.
48. 스터디 개설 fragments.html 에서 스터디 개설 url 수정 // .............. 로그인 가입 // /new-study로 수정 스터디 개설 // ........... 스터디 폼 요청 처리와 스터디 폼 스터디 생성 폼의 요청을 받는 핸들러 작성 package me.weekbelt.studyolle.study; @Controller public class StudyController { @GetMapping("/new-study") public String newStudyForm(@CurrentAccount Account account, Model model) { model.addAttribute(account); model.addAttribute(new StudyForm()); return "stu.. 2020. 4. 23.
47. 스터디 도메인 Study에서 Account 쪽으로 @ManyToMany 단방향 관계 두 개(managers, members) Study에서 Zone으로 @ManyToMany 단방향 관계 Study에서 Tag로 @ManyToMany 단방향 관계 Study 엔티티 작성 package me.weekbelt.studyolle.domain; @Builder @AllArgsConstructor @NoArgsConstructor @Getter @Setter @EqualsAndHashCode(of = "id") @Entity public class Study { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @ManyToMany private Set.. 2020. 4. 23.
46. 스터디 관리 기능 미리보기 스터디 관리 기능 스터디 만들기 스터디 공개 및 종료 스터디 인원 모집 스터디 설정 배너 이미지 스터디 주제 (Tag) 활동 지역 (Zone) 스터디 관리 (공개 / 경로 변경 / 이름 변경 / 스터디 삭제) 스터디 참여 / 떠나기 참고: https://www.inflearn.com/course/%EC%8A%A4%ED%94%84%EB%A7%81-JPA-%EC%9B%B9%EC%95%B1# 스프링과 JPA 기반 웹 애플리케이션 개발 - 인프런 이 강좌에서 여러분은 실제로 운영 중인 서비스를 스프링, JPA 그리고 타임리프를 비롯한 여러 자바 기반의 여러 오픈 소스 기술을 사용하여 웹 애플리케이션을 개발하는 과정을 학습할 수 있습니다. 이 강좌를 충분히 학습한다면 여러분 만의 웹 서비스를 만들거나 취직에 도움.. 2020. 4. 23.