CLOB ๋ฌธ์ ๋ํ ๋ฐ์ดํฐ ๋ณด๊ด์ฉ ์ค๋ผํด์ CLOB VARCHAR2 ์ฌ์ด์ ์์์ ๋ณํ์ ์ํํด์ค๋ค. ์ต๋ 4GB๊น์ง ์ ์ฅ ๊ฐ๋ฅ ๋ฐ๋ก SIZE ์ง์ ์ํ๊ณ ์ฌ์ฉ CLOB ์ปฌ๋ผ Select ์ ์ฃผ์ ์ฌํญ CLOB ์ปฌ๋ผ์ ์ต๋ 4GB์ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ ์ ์๊ธฐ ๋๋ฌธ์, row ์๊ฐ ๋ง์์ง๋ค๋ฉด ์ฑ๋ฅ๋ฉด์์ ํฐ ๋ถ๋ด์ด ๋ ์ ์๋ค. ๊ทธ๋ ๊ธฐ ๋๋ฌธ์ CLOB ์ปฌ๋ผ ์กฐํ ์ ์ ์ฒด ๋ฐ์ดํฐ๊ฐ ์๋ ์ผ๋ถ ๋ฐ์ดํฐ๋ง ๋ณด์ฌ์ง๊ฒ ๋๋ค. (๋ฐ์ดํฐ๊ฐ ์๋ชป ๋ค์ด ๊ฐ๊ฒ ์๋..!) ์ ์ฒด ๊ฐ์ ์กฐํํ๊ณ ์ถ๋ค๋ฉด dbms_lob.substr(์ปฌ๋ผ๋ช
, dbms_lob.getlength(์ปฌ๋ผ๋ช
)) ์ ์ด์ฉํด์ ์กฐํํ๋ค. ๋จ, Orange ํด์ ์ฌ์ฉํ๊ณ ์๋ค๋ฉด ์ ์ฒด ๋ฐ์ดํฐ๋ฅผ ๋ณด์ฌ์ค๋ค๊ณ ํ๋ ์ฐธ๊ณ ! [Tools] - [Orange Options…] ..
Today I Learned/2022
@UtilityClass UtilityClass๋ฅผ ์์ฑํ ๋, ์ดํํฐ๋ธ ์๋ฐ์์ ์ ํธ ํด๋์ค์ ๋ํ ์ธ๊ธ์ด ์์๋ ๊ธฐ์ต์ด ๋์ ๊ตฌ๊ธ๋ง ํ๋ค๊ฐ ์ฐพ์ ์ด๋
ธํ
์ด์
boilerplate๋ก ๊ฐ์ฃผํ ๋งํผ ์ผ๋ฐ์ ์ธ์ง์ ๋ํ ๋
ผ์์ด ์๋ ํ์์ด๋ผ ์คํ ๊ธฐ๋ฅ์ผ๋ก ๋์
๋์๋ค๊ณ ํจ (lombok v1.16.2) boilerplate : ์ต์ํ์ ๋ณ๊ฒฝ์ผ๋ก ์ฌ๋ฌ๊ณณ์์ ์ฌ์ฌ์ฉ๋๋ฉฐ, ๋ฐ๋ณต์ ์ผ๋ก ๋น์ทํ ํํ๋ฅผ ๋๋ ์ฝ๋๋ฅผ ๋งํ๋ค. ๊ธฐ๋ฅ private ์์ฑ์๊ฐ ์๋์ผ๋ก ์์ฑ๋์ด ์ธ์คํด์คํ ํ ์ ์๊ฒ ๋ง์ final class ์ผ๋ก ์ง์ ๋์ด ์์ ๋ฐ์ ์ ์๊ฒ ๋จ ๋ด๋ถ์ ๋ชจ๋ ๋ฉค๋ฒ์ ๋ฉ์๋๋ static ์ฒ๋ฆฌ ๋จ. (inner class static ์ฒ๋ฆฌ ๋จ) // With Lombok import lombok.experimental..
๋น์ 1์ผ ๋ฐ ๋ง์ผ ๊ตฌํ๊ธฐ 1์ผ : firstDayOfMonth() ๋ง์ผ : lastDayOfMonth() 00:00:00 ๋ฐ 23:59:59๋ LocalTime.MIN ๋ฐ LocalTime.MAX ๋ฅผ ์ด์ฉํ๋ค import static java.time.temporal.TemporalAdjusters.* LocalDateTime today = LocalDateTime.now(); LocalDateTime starttime = today.with(firstDayOfMonth()).with(LocalTime.MIN); // ๋น์ 1์ผ 00:00:00 LocalDateTime endtime = today.with(lastDayOfMonth()).with(LocalTime.MAX); // ๋น์ ๋ง์ง๋ง๋ 23:5..
Spring REST Docs ๊ฐํ ๋ฐ๋ก ๊ฐํ ๋ฌธ์๋ฅผ ์
๋ ฅํ๋ฉด ์๋๊ณ , ๋ฌธ์์ด์์ + ๋ช
์ ํ \n ์
๋ ฅ // ๊ฐํ์ ๋ฌธ์์ด์ ํ์นธ(์คํ์ด์ค) ๋๊ณ + ์
๋ ฅ // ๊ทธ๋ฆฌ๊ณ ๊ฐํ ๋ฌธ์๋ฅผ ๋ฐ๋ก "\n" parameterWithName("name").description("This is the description +" + "\n" + "in the table."), // ์๋๋ ๋ฒ์ parameterWithName("name").description("This is the description \n in the table."), ๐ Reference ๋๋ณด๊ธฐ https://stackoverflow.com/questions/66405730/when-using-spring-rest-docs-how-do-i-make..
MyBatis parameterType, resultType์ Static Inner Class ์ฌ์ฉ OuterClass$InnerClass๋ก ์ ๊ทผ $๋ ๋ณ์๋ฅผ ์๋ฏธํ๋ ๊ฒ ์๋๋ผ, Java์ ํน์ฑ๋๋ฌธ์
๋๋ค. Java์์ ํ๋ก๊ทธ๋๋ฐํ ๋์๋ Class์์์ InnerClass์ ์ ๊ทผํ ๋, ๋ชจ๋ ๊ตฌ๋์ ์ ์ฌ์ฉํ์ง๋ง, ํน์ ํด๋์ค๋ฅผ ์ฝ์ด์์ผ ํ๋ ํด๋์ค๋ก๋์์๋ Package namespace๋ ๊ตฌ๋์ (.)์ผ๋ก ๊ตฌ๋ถํ๊ณ , ํด๋์ค์ InnerClass์ namespace๋ $๋ก ๊ตฌ๋ถํฉ๋๋ค. ํ๋์(Daeyoung Heo) 2016.4.22 00:42 ๐ Reference ๋๋ณด๊ธฐ https://hashcode.co.kr/questions/1753/mybatis%EC%97%90%EC%84%9C-inner-cla..