반응형

MVC

    Spring, spring-boot의 mvc 다양한 설정 설명

    Spring에서 사용하는 다양한 설정이 존재한다. 그 설정들에 대한 정리가 필요할 것같아서 한번 정리해 보았다. ※ 스프링 MVC 사용을위한 설정- 기존에 스프링 MVC 설정을 위해서 xml 파일에 다음과 같이 설정하였다. 하지만 대부분의 설정이 xml에서 java로 변경하는 추세에서는 다음과 같이 설정한다.12345@Configuration@EnableWebMvcpublic class WebConfig { }cs여기서 추가적인 기본 설정들을 커서텀하고 싶을 경우 WebMvcConfigurerAdapter 추상클래스를 상속받아 재정의하여 사용했다.12345@Configuration@EnableWebMvcpublic class WebConfig extends WebMvcConfigurerAdapter { ..

    스프링 프레임워크의 기본적인 구성

    1. VO 객체 -> 데이터를 담을 객체를 생성 public class BoardVO { private Integer bno; private String title; private String content; private String writer; private Date regdate; private int viewcnt; public Integer getBno() { return bno; } public void setBno(Integer bno) { this.bno = bno; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getCont..

반응형