Ctrl
+Shift
+X
를 눌러서 익스텐션 검색 탭을 연다
ctrl
shift
a
눌러서 진행엔터치면 프로젝트 생성됨 + 최초 오픈시 라이브러리 다운받음
디버그 콘솔 색깔 변경
application.yml
은
톰캣의 .xml
설정과
스프링프레임워크 설정을 한번에 할수 있다 !!!
결과
implementation group: 'org.apache.tomcat', name: 'tomcat-jasper', version: '9.0.43'
implementation 'javax.servlet:jstl'
spring:
output:
ansi:
enabled: always
// 아래가 ViewRosolver 설정 / 복사할 경우 주석은 삭제할것
mvc:
view:
prefix: /WEB-INF/views/
suffix: .jsp
@Controller
이용해서 ViewRosolver
발동우려했던 상황이 발생, JSP 지원이 안되는것 같다.
JSP 파일을 스니펫으로 만들어서 배우자.
jsp.json 에 스니펫 저장 ( 아니면 html.json 에 저장해도 됨 )
{
"Jsp Template": {
"prefix": "jsp",
"body": [
"<%@ page language=\"java\" contentType=\"text/html; charset=UTF-8\" pageEncoding=\"UTF-8\"%>",
"<%@ taglib prefix=\"c\" uri=\"http://java.sun.com/jsp/jstl/core\"%>",
],
"description": "Jsp Template"
}
}
H2 DB - 드라이버 + 프로그램이 같이 있다
JPA
yml 세팅
spring:
datasource:
url: jdbc:h2:mem:test;MODE=MySQL
driver-class-name: org.h2.Driver
username: sa
password:
h2:
console:
enabled: true
jpa:
open-in-view: true
hibernate:
ddl-auto: create
show-sql: true
output:
ansi:
enabled: always
jstl을 사용하기 위한 추가설치
mapper .xml 에서 자동완성
xml 에서 사용할 스니펫 추가 ( xml.json )
{
"Mapper Template": {
"prefix": "mapper",
"body": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>",
"<!DOCTYPE mapper",
" PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\"",
" \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">",
"",
"<mapper namespace=\"\">",
" <select id=\"findAll\" resultType=\"\">",
" select * from where id = #{id}",
" </select>",
"</mapper>",
],
"description": "mapper Template"
}
}
https://developer.mozilla.org/ko/docs/Web/HTTP/Status - http 상태코드