Spring/Boot
-
[Boot] Use procedureSpring/Boot 2022. 9. 10. 21:30
libs 폴더 생성해 cos.jar 추가하기 \src\main\resources\application.properties # Server port server.port=8070 # JSP spring.mvc.view.prefix=/WEB-INF/views/ spring.mvc.view.suffix=.jsp # multi-part Form spring.servlet.multipart.enabled=false # Oracle spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.datasource.url=jdbc:oracle:thin:@localhost:1521:xe spring.datasource.username=scott spring.d..
-
[Boot] TransactionSpring/Boot 2022. 9. 10. 21:08
동작에 오류가 발생하면 처음 상태로 되돌림 sql.sql drop table transaction1; drop table transaction2; drop table transaction3; create table transaction1( id varchar2(20), amount number(10) ); create table transaction2( id varchar2(20), amount number(10) ); create table transaction3( id varchar2(20), amount number(10) ); Controller package com.ecl.g13.controller; import org.springframework.stereotype.Controller; imp..
-
[Boot] MyBatisSpring/Boot 2022. 9. 10. 21:06
\src\main\resources\application.properties # Server port server.port=8070 # JSP spring.mvc.view.prefix=/WEB-INF/views/ spring.mvc.view.suffix=.jsp # Oracle spring.datasource.driver-class-name=oracle.jdbc.OracleDriver spring.datasource.url=jdbc:oracle:thin:@localhost:1521:xe spring.datasource.username=scott spring.datasource.password=tiger # mybatis mybatis.mapper-locations=classpath:mybatis/mapp..
-
[Boot] JDBCSpring/Boot 2022. 9. 10. 20:50
build.gradle plugins { id 'org.springframework.boot' version '2.7.2' id 'io.spring.dependency-management' version '1.0.12.RELEASE' id 'java' } group = 'com.ecl' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-jdbc' i..
-
[Boot] ValidationSpring/Boot 2022. 9. 10. 20:48
Validation: null, 빈 값인지 검증하는 Annotation src\main\java\com\ecl\g06\ package com.ecl.g06; import lombok.Data; @Data public class ContentDto { private String writer; private String content; } package com.ecl.g06; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class ValidController { @RequestMapping("/") public Stri..
-
[Boot] LombokSpring/Boot 2022. 9. 10. 20:45
Lombok: Annotation 기반으로 반복되는 getter, setter와 같은 코드를 자동완성 해주는 라이브러리 설치하기 https://projectlombok.org/download Download projectlombok.org 프로젝트 생성 시 lombok 체크 build.gradle plugins { id 'org.springframework.boot' version '2.7.2' id 'io.spring.dependency-management' version '1.0.12.RELEASE' id 'java' } group = 'com.ecl' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' repositories { mavenCentral(..
-
[Boot] GradleSpring/Boot 2022. 9. 10. 20:41
workspace 폴더 바꾸기 기본 설정 프로젝트 생성 server 연결 build.gradle src\main\resources\application.properties # Server port server.port = 8070 html 스트링 부트 시작페이지 open web browser JSP build.gradle plugins { id 'org.springframework.boot' version '2.5.3' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' } group = 'com.ecl' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' repositories {..