Closed shach1990 closed 1 month ago
@homejim do you please know about it?
Additionally, HotswapAgent is compiled based on the latest version of the main branch.
@homejim do you please know about it?
When I added annotation auto-reload to the MyBatis plugin, the situation was verified in the unit test org.hotswap.agent.plugin.mybatis.MyBatisPluginAnnoTest
. However, it might be slightly different with MyBatis-Plus? I will attempt to reproduce and address this issue later.
@shach1990 The issue has been fixed; you can download this to run it. https://github.com/homejim/HotswapAgent/releases/download/1.4.2.1-SNAPSHOT/hotswap-agent.jar
@homejim Upon verification, it has been confirmed that without XML configuration and Mapper configuration, the MyBatisPlugin and MyBatisPlusPlugin are not being initialized, which causes them not to function as intended. This issue is resolved by initializing these plugins during the ClassLoad event of SqlSessionFactoryBean and MybatisSqlSessionFactoryBean, enabling them to work correctly.
Versions:
When using @Select in the Mapper with corresponding Mapper XML, modifying the SQL in @Select and then reloading works as expected. When using @Select in the Mapper without a corresponding Mapper XML, modifying the SQL in @Select and then reloading does not work. Is it necessary to create a corresponding XML for the Mapper to enable normal reload functionality? Could this be a bug?