๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์˜ค๋ฅ˜3

[thymeleaf] property or field name cannot be found on null ์˜ค๋ฅ˜ ํ”„๋กœ์ ํŠธ ์ž‘์—… ์ค‘ ์ƒ๊ธด thymeleaf ์˜ค๋ฅ˜๋กœ 5์‹œ๊ฐ„์ด๋‚˜ ์‚ฝ์งˆํ–ˆ๋‹ค. Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'orderConfirmationLogCode' cannot be found on null orderConfirmationLogCode ํ”„๋กœํผํ‹ฐ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†๋‹ค๋Š” ๋ฌธ๊ตฌ. DTO๋„ ์‚ดํŽด๋ณด๊ณ  XML์˜ resultMap์— ์นผ๋Ÿผ์ด ์—†๋Š”์ง€๋„ ์ฐพ์•„๋ณด๊ณ  ์ฟผ๋ฆฌ ๋ฌธ์žฅ์ด ์ž˜๋ชป ๋ฌ๋Š”์ง€๋„ ์ฐพ์•„๋ดค์œผ๋‚˜ ์ „ํ˜€ ์ด์ƒ ์—†์Œ. ๊ตฌ๊ธ€๋ง ํ•ด๋ดค๋Š”๋ฐ ๊ฐ’์ด null์ผ ๋•Œ ์ด๋Ÿฐ ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด๋‹ค๊ณ  ํ•ด์„œ ๊ฐ’์„ ๋‹ด์€ ๊ฐ์ฒด๋ฅผ ์ถœ๋ ฅํ•ด๋ดค๋Š”๋ฐ ๊ฐ์ฒด์•ˆ์— ๊ฐ’์€ ๋ถ„๋ช…ํžˆ ์กด์žฌํ•˜๊ณ  ์žˆ๋‹ค! ใ… ใ…  ๊ทธ๋ฆฌ๊ณ  ๊ฐ€์žฅ ๋„Œ์„ผ์Šคํ–ˆ๋˜ ๋ถ€๋ถ„์€ ํ™”.. 2023. 11. 24.
jsp ์˜ jdbc - java์™€ DB ์—ฐ๋™ JDBC(Java Database Connectivity)๋Š” Java์—์„œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ ‘๊ทผํ•˜๊ธฐ ์œ„ํ•œ API(Application Programming Interface)์ž…๋‹ˆ๋‹ค. ์ด API๋Š” SQL๊ณผ DBMS์— ๋Œ€ํ•œ Java์˜ ํ‘œ์ค€ SQL ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์•ก์„ธ์Šค๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. JDBC๋Š” DBMS ์ข…๋ฅ˜์— ๊ด€๊ณ„ ์—†์ด ๋™์ผํ•œ ์ฝ”๋“œ๋กœ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ๋‹ค๋ฃจ๋Š” ๊ฒƒ์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด, DBMS ์—ฐ๊ฒฐ์„ ์œ„ํ•œ ๋“œ๋ผ์ด๋ฒ„๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ด ๋“œ๋ผ์ด๋ฒ„๋Š” ๊ฐ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๋ฒค๋”๊ฐ€ ์ œ๊ณตํ•˜๋ฉฐ, ์‚ฌ์šฉ์ž๋Š” ์ด ๋“œ๋ผ์ด๋ฒ„๋ฅผ ์ด์šฉํ•ด ํ•ด๋‹น DBMS์™€ ์—ฐ๊ฒฐํ•˜๊ณ  ๋ฐ์ดํ„ฐ๋ฅผ CRUD(Create, Read, Update, Delete) ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋“œ๋ผ์ด๋ฒ„ ๋กœ๋“œ: Class.forName() ๋ฉ”์†Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ JDBC ๋“œ๋ผ์ด๋ฒ„๋ฅผ ๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ.. 2023. 7. 31.
Java - setting, getting ์ˆ˜์—… ๋‚ด์šฉ ์ •๋ฆฌ 0. ์™„์„ฑ ์ฝ”๋“œ package kr.or.ksmart.a; // ํšŒ์› ๊ด€๋ฆฌ ํด๋ž˜์Šค ์ตœ์ข… public class User { // ์ „์—ญ ๋ณ€์ˆ˜ (global variable = ํ•„๋“œ (Field) // class block (body) ์•ˆ์ชฝ๊ณผ method block(body) ๋ฐ–์— ์„ ์–ธ๋œ ๋ณ€์ˆ˜ // ์œ ์‚ฌ์šฉ์–ด : ํ”„๋กœํผํ‹ฐ (property) // private = ํด๋ž˜์Šค ๋‚ด์—์„œ๋งŒ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•œ ์ ‘๊ทผ ์ œ์–ด์ž private String uid; private String upw; private String uphone; private char ugender; private int uage; private String ulevel; // 1. uid ์ „์—ญ๋ณ€์ˆ˜์— ๊ฐ’์„ ์…‹ํŒ…ํ•˜๋Š” ๋ฉ”์„œ๋“œ ์„ ์–ธ public void setU.. 2023. 7. 11.