목록SPRING/chapter04_MVC (62)
WON.dev
package org.joonzis.domain; import lombok.Data; @Data public class PageDTO { private int startPage; //시작 페이지 번호 private int endPage;//끝 페이지 번호 private boolean prev, next; //이전 , 다음페이지 이동 private int total;//전체 게시물 수 private Criteria cri; //페이지 번호를 10개씩 본다는 가정 public PageDTO(Criteria cri, int total) { this.cri = cri; this.total = total; this.endPage = (int)(Math.ceil(cri.getPageNum() / 10.0)) * 1..
package org.joonzis.domain; import java.sql.Date;//Date 에서 sql로 import해주기 import java.util.List; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class MemberVO { private String userid, userpw, username; private Date regdate, updatedate;//Date 에서 sql로 import해주기 private boolean enabled; private List authList..
package org.joonzis.domain; import org.springframework.web.util.UriComponentsBuilder; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; import lombok.ToString; @Getter @Setter @ToString @AllArgsConstructor public class Criteria { private int pageNum; //페이지 개수 private int amount; //몇개씩 본다 public Criteria() { //기본 생성자 this(1,10); //1페이지에 10개씩 보겠다는 의미 } public String get..
package org.joonzis.domain; import java.sql.Date; import java.util.List; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data //Getter,Setter만 필요하면 따로 생성해도 무방하다 @NoArgsConstructor //기본생성자 @AllArgsConstructor //풀생성자 public class BoardVO { private long bno; private String title,content,writer; private Date regdate , updatedate; private int replycnt; //등록할 때 ..
package org.joonzis.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class BoardAttachVO { private String uuid; private String uploadPath; private String fileName; private boolean fileType; private long bno; }
package org.joonzis.domain; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class AuthVO { private String userid, auth; }
package org.joonzis.controller; import java.io.File; import java.net.URLDecoder; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.UUID; import org.joonzis.domain.BoardAttachVO; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.Resource; import org.springframework.http.HttpHeaders;..
package org.joonzis.controller; import org.springframework.security.access.annotation.Secured; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import lombok.extern.log4j.Log4j; @Log4j @Controller @RequestMappi..
package org.joonzis.controller; import java.util.List; import org.joonzis.domain.ReplyVO; import org.joonzis.service.ReplyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import ..
package org.joonzis.controller; import java.text.DateFormat; import java.util.Date; import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public c..