Open xuxiaowei-com-cn opened 3 months ago
I added a pipeline based on Ubuntu and macOS for testing native applications, and it has now passed the test
我添加了一个基于Ubuntu和macOS的流水线来测试原生应用程序,现在它已经通过了测试
https://github.com/xuxiaowei-com-cn/mybatis-spring-boot-starter/actions/workflows/native.yaml
good job. need it
Hi @xuxiaowei-com-cn, I'm not all that familiar with the native aspect. I know we have a project for spring native that has had issues for a while and on obsolete path. Does this replace that or complement it? Is this work completely done? Its a lot of changes so I want to be sure what I'm reviewing before spending a lot of time on it.
Hi @hazendaz , This function is used for replacement https://github.com/mybatis/spring-native, This function is not yet completed, with the following defects:
The resultType
in Mapper XML must use sample.mybatis.graalvm.xml.domain.City
instead of City
, for example:
<mapper namespace="sample.mybatis.graalvm.xml.mapper.CityMapper">
<select id="selectCityById" resultType="sample.mybatis.graalvm.xml.domain.City">
select id, name, state, country from city where id = #{id}
</select>
</mapper>
mybatis.config-location=classpath:mybatis-config.xml
is not supported and requires the use
of src/main/resources/META-INF/native-image/resource-config.json
, for example:
{
"resources": {
"includes": [
{ "pattern": "sample/mybatis/graalvm/xml/mapper/CityMapper.xml" },
{ "pattern": "sample/mybatis/graalvm/xml/mapper/HotelMapper.xml" }
]
}
}
https://github.com/mybatis/spring-boot-starter/issues/994