웹(11)
-
SPRING - @RequestMapping 의 Produces,Headers 속성
ErrorPage를 만들기 위해 @RequestMapping(produces = {"text/html"}) public ModelAndView error(HttpServletRequest request, HttpServletResponse response) { } 윗 부분 작업을 하다가 형식이 text/html로 되어있는걸 맵핑하는건 알겠는데 문득 produces가 정확하게 어떤건지, headers와는 어떤차이가 있는지 알아둬야할 필요성이 있다고 생각했습니다. 토비의 스프링을 찾아보니 엘리먼트 요청 조건 지원버젼 headers HTTP 헤더 3.0,3.1 PRODUCES Accept헤더 3.1 이후 설명에 Accept 헤더는 headers 대신 produces 엘리먼트를 이용해 조건을 지정할 수 있다. ..
2019.09.10 -
웹프로젝트-3. -스프링부트- JSP 설정하기, Hello Word 출력
thymleaf 가 되어있긴 한데 사용할 줄 몰라서 익숙한 것을 찾았습니다. 출처:https://jsijsi99.tistory.com/10[삽질대마왕 이대장] 위 출처의 내용을 따라했습니다. spring-boot-starter-web 에 포함된 tomcat 은 JSP 엔진을 포함하고 있지 않습니다. javax.servlet jstl org.apache.tomcat.embed tomcat-embed-jasper 위와 같이 jasper 와 jstl 을 의존성에 포함시켜줘야 JSP파일의 구동이 가능합니다. application.properties 에 아래 내용 추가. spring.mvc.view.prefix=/WEB-INF/jsp/ spring.mvc.view.suffix=.jsp jsp 파일은 Springb..
2019.09.05 -
웹프로젝트-3. -스프링부트- 실행해보기
DB 설치후 USER와 database를 만들어 주었습니다. 중간에 진행하다말고 DB를 해줬던 이유는 스프링부트를 실행시켜보니 DB 접근 오류가 떨어져서 였습니다.. (pom에 특정 기능이 추가 되어있어서 그런지, 원래 db를 접근해야 실행가능한건지는 의문) 어쨌든 DB를 구성했으니 제대로 실행되는지 테스트를 위해 appication.properties 에 server.port=9090 spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://127.0.0.1:3306/kecmok?characterEncoding=UTF-8 spring.datasource.username=kecmok spring...
2019.09.05 -
웹프로젝트-2. -DB (MySql)- 설치하기, database생성, user 생성
프로젝트에 사용할 db를 구축하기 위하여 MYSQL을 설치해보도록 합시다. https://www.mysql.com/ MySQL Over 2000 ISVs, OEMs, and VARs rely on MySQL as their products' embedded database to make their applications, hardware and appliances more competitive, bring them to market faster, and lower their cost of goods sold. Learn More » www.mysql.com 접속후 download 클릭 로그인을 하라고 뜨네요 . 오라클 로그인을 한 후 go to download page 하단의 download를 눌러줍니다..
2019.09.05 -
웹프로젝트-1. -스프링부트 - 시작하기
스프링부트로 웹프로젝트를 만들어볼 생각입니다. 가장 처음엔 sts를 다운로드를 합니다. https://spring.io/tools3/sts/all Spring Tool Suite™ 3 (STS 3) Download page Use one of the links below to download an all-in-one distribution for your platform. Choose either a native installer or simple archive, they contain equivalent functionality spring.io 스프링 스타터 프로젝트를 시작합니다. 디렉토리 구조 static -html,img,css 등 templates - thymleaf 템플릿 application..
2019.09.05