목록타임리프 (9)
투케이2K

[개발 환경 설정] 개발 툴 : inteli j 개발 언어 : spring [폴더 및 파일 설정] [소스 코드] [소스코드 : config >> MvcConfiguration] package com.project.researchpackage.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration public class Mv..

[개발 환경 설정] 개발 툴 : inteli j 개발 언어 : spring [소스 코드] [결과 출력] [요약 설명] /* * [요약 설명] * 1. 사용자는 특정 컨트롤러 api를 호출합니다 * 2. 타임리프 매핑을 수행하는 컨트롤에서 Model 객체를 사용해 타임리프 뷰로 넘길 데이터를 지정합니다 * 3. 타임리프 뷰가 호출되면서 >> 자바스크립트에서 Model에서 지정한 데이터를 확인합니다 * 4. 참고 : 자바스크립트에서 Model 데이터를 확인하기 위해서는 CDATA 를 사용해야합니다 * */

[개발 환경 설정] 개발 툴 : inteli j 개발 언어 : spring [소스코드 : templates >> testThymeleafLang.html] [문법] th:text="${key}" : 텍스트 지정 = 특정 key 변수 호출 이름 : 나이 : 성별 : [문법] th:each="n_data : ${name}" th:text="${n_data}" : 단순 변수 지정 및 데이터 결합 이름 : 나이 : 성별 : [문법] th:if / th:unless : if else 조건문 처리 이름 : 이름 : [문법] th:switch / th:case : switch 문 분기 처리 실시 이름 : 1번 투케이 2번 투케이 ELSE 투케이 [문법] th:each : List 객체 데이터 for 반복 출력 실..

[개발 환경 설정] 개발 툴 : inteli j 개발 언어 : spring [로직 설명] [폴더 및 파일 설정] [소스 코드 : build.gradle] //thymeleaf implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' [소스 코드 : application.yml] spring: devtools: livereload: enabled: true datasource: driver-class-name: oracle.jdbc.OracleDriver url: jdbc:oracle:thin:@115.68.186.215:1521:servername username: schemauser p..

[개발 환경 설정] 개발 툴 : inteli j 개발 언어 : spring [폴더 및 파일 추가] [소스코드 : build.gradle 타임리프 의존성] //thymeleaf implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' [소스코드 : application.yml] spring: devtools: livereload: enabled: true datasource: driver-class-name: oracle.jdbc.OracleDriver url: jdbc:oracle:thin:@115.68.176.215:1521:username username: userschema pass..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : inteli j 개발 언어 : spring /* =========================== */ /* =========================== */ [폴더 및 파일 추가] /* =========================== */ /* =========================== */ [소스 코드 : application.yml] spring: devtools: livereload: enabled: true datasource: driver-class-name: oracle.jdbc.OracleDriver url: jdbc:oracle:thin..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : inteli j 개발 언어 : spring /* =========================== */ /* =========================== */ [폴더 및 파일 추가] /* =========================== */ /* =========================== */ [소스 코드 : model >> Insert_Table_Model] package com.project.solutionpackage.model; import lombok.Data; @Data public class Insert_Table_Model { /** * [클래스 설명] * 1..

/* =========================== */ [ 참고 사이트 ] /* =========================== */ /* =========================== */ [사이트 주소] https://jongminlee0.github.io/2020/03/12/thymeleaf/ [SpringBoot] 타임리프(Thymeleaf) - Jongmin's Blog 1. 템플릿 엔진(Template Engine) JongMinLee0.github.io https://eblo.tistory.com/55 Spring boot - Thymeleaf 기본 문법 1. Thymeleaf 기본 표현 자세한 문법은 Thymeleaf 사이트의 튜토리얼을 참고하는게 좋습니다. 기본 표현, ..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : inteli j 개발 언어 : spring /* =========================== */ /* =========================== */ [폴더 및 파일 추가] /* =========================== */ /* =========================== */ [소스 코드 : controller >> ThymeLeafController] package com.project.solutionpackage.controller; import com.project.solutionpackage.model.Return_DB_Json_Model; impo..