728x90
๋ฐ˜์‘ํ˜•

mybatis 3

[myBatis] keyColumn, keyProperty ์ฐจ์ด

https://keichee.tistory.com/289 [MyBatis] ์ „๋‹ฌ๋ฐ›์€ ๊ฐ์ฒด์— ๊ฐ’ ์„ธํŒ…ํ•˜๊ธฐ (selectKey) MyBatis์—์„œ ์ „๋‹ฌ๋ฐ›์€ ๊ฐ์ฒด(MyObject)์˜ ํ•„๋“œ์— ํŠน์ • ๊ฐ’์„ ์„ธํŒ…ํ•  ๋•Œ selectKey ํƒœ๊ทธ๋ฅผ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ์˜ˆ๋ฅผ๋“ค์–ด MyObject๊ฐ€ ์•„๋ž˜ ๋‘ ๊ฐœ์˜ ํ•„๋“œ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ํด๋ž˜์Šค๋ผ๊ณ  ๊ฐ€์ •ํ•˜์ž.String id;String name; MyBatis keichee.tistory.com ์ฃผ์˜์ ์€ ๋‘˜๋‹ค ์—ฌ๋Ÿฌ๊ฐœ ์ž…๋ ฅํ•˜๋ฉด ์ฝค๋งˆ๋กœ ์ด์–ด์ฃผ๋ฉด ๋˜๋Š”๋ฐ ๋„์–ด์“ฐ๊ธฐ๋ฅผ ํ•˜๋ฉด ์˜ค๋ฅ˜๊ฐ€๋‚œ๋‹ค!

DB 2023.07.07

[Error]Could not resolve type alias 'boardResultMap'. Cause: java.lang.ClassNotFoundException: Cannot find class: boardResultMap

[์˜ค๋ฅ˜๋‚ด์šฉ] ERROR: org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resourc..

Error 2022.02.22

[MyBatis] ResultMap์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์ž

ResultMap ์ด๋ž€? myBatis์—์„œ ์ œ๊ณตํ•˜๋Š” ์ž๋™ ๋งคํ•‘์œผ๋กœ ํ•ด๊ฒฐ์ด ์–ด๋ ค์šด ๊ฒฝ์šฐ๋ฅผ ์œ„ํ•ด ๊ตฌ์กฐ๋ฅผ ์„ค๊ณ„ํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์–ด์ง„ ๋„๊ตฌ : ๋ณต์žกํ•œ ๊ฒฐ๊ณผ ๋งคํ•‘ํ•  ๋•Œ ์‚ฌ์šฉ + colloection : 1: N ๊ด€๊ณ„์˜ ํ…Œ์ด๋ธ” ์กฐ์ธํ• ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๊ฐ์ฒด - property : ์กฐ์ธ ๊ฐ์ฒด ๋ช… - ofType : collection์˜ ์ž๋ฃŒํ˜•

Error 2022.01.25
728x90
๋ฐ˜์‘ํ˜•