Career/Spring Boot

[Spring Boot] 스프링부트 Alias 사용방법

AlexHouse 2022. 7. 20. 11:52
728x90

 

 

 

 

application.properties에

 

 

 

mybatis.type-aliases-package=com.example.test

 

선언

 

 

	<select id="selectList" resultType="Test">
		SELECT * FROM lsmd_adm_sect_umd_11;
	</select>

 

 

resultType에  com.example.test.Test

 

적지 않고 Test 만 적어도 사용이 가능하다.

 

 

 

예시

 

별칭(alias) 데이터 형태(data type)
string String
date Date
map Map
hashmap HashMap
list List
arraylist ArrayList
decimal BigDecimal
bigdecimal BigDecimal
biginteger BigInteger
_byte byte
_long long
_short short
_int int
_integer int
_double double
_float float
_boolean boolean
_byte[] byte[]
_long[] long[]
_short[] short[]
_int[] int[]
_integer[] int[]
_double[] double[]
_float[] float[]
_boolean[] boolean[]
byte Byte
long Long
short Short
int Integer
integer Integer
double Double
float Float
boolean Boolean
byte[] Byte[]
long[] Long[]
short[] Short[]
int[] Integer[]
integer[] Integer[]
double[] Double[]
float[] Float[]
boolean[] Boolean[]
object Object
date[] Date[]
decimal[] BigDecimal[]
bigdecimal[] BigDecimal[]
biginteger[] BigInteger[]
object[] Object[]
collection Collection
iterator Iterator
ResultSet ResultSet

 

 

[참조] java119.tistory.com/45

 

 

 


 

 

to be continue..

728x90