Quarkus 에서 jpa 가 아닌 mybatis 구성 이력을 남겨본다.
기억에 의존하여 작성하였다.
implementation 'io.quarkiverse.mybatis:quarkus-mybatis-parent:0.0.9'
implementation 'io.quarkiverse.mybatis:quarkus-mybatis:0.0.9'
//compile 'io.quarkus:quarkus-hibernate-validator:1.13.6'
compile ('io.quarkus:quarkus-hibernate-validator:1.13.6') {
exclude group: "com.sun.jersey"
}
@Mapper
public interface Mapper {
@Select("select"
+ " key, refer"
+ " from"
+ " reply"
+ " and regdate > STR_TO_DATE(#{minDate}, '%Y%m%d')"
+ " and key = #{key}"
+ " ORDER by key ASC"
+ " LIMIT 5")
public List<ModelVo> getData(int key, String minDate);
}
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ModelVo implements Serializable{
private Integer key;
private String refer;
}
List<ModelVo> dataVo = rankNewsMapper.getData(data.getKey(), 날짜형식 입력);
quarkus.native.additional-build-args=-H:ReflectionConfigurationFiles=reflection-config.json
[
{
"name" : "com.test.ModelVo",
"allDeclaredConstructors" : true,
"allPublicConstructors" : true,
"allDeclaredMethods" : true,
"allPublicMethods" : true,
"allDeclaredFields" : true,
"allPublicFields" : true
}
]