Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Support annotation based on MyBatis for Spring Boot 3 Native #995

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

xuxiaowei-com-cn
Copy link

@xuxiaowei-com-cn
Copy link
Author

xuxiaowei-com-cn commented Aug 7, 2024

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

@iloveuaa
Copy link

good job. need it

@hazendaz
Copy link
Member

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.

@xuxiaowei-com-cn
Copy link
Author

xuxiaowei-com-cn commented Sep 15, 2024

Hi @hazendaz , This function is used for replacement https://github.com/mybatis/spring-native, This function is not yet completed, with the following defects:

  1. 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>
  2. 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" }
        ]
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants