-
Notifications
You must be signed in to change notification settings - Fork 491
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
Add unit test code for the MyBatis plugin. #559
Conversation
…E) occurs during reload, and also differentiate between MyBatis and MyBatis-Spring modes
Fix the issue where using the insertAt method might fail due to changes in the processPropertyPlaceHolders method body. Add a list variable at the beginning of the method, include the factory in the list after factory initialization, and finally execute the removal logic at the end of the method. Why not execute the removal right after initialization? I tried that, but it fails during reload.
Update MyBatisTransformers.java
1.Refactor MyBatisTransformers code to improve readability and maintainability. 3.Feature Added: Enable SQL reload when using annotation-based SQL. 2.Feature Added: Enable reload when there are changes in entity classes, such as result entity or parameter entity classes.
…ring-mybatis has a dependency on it.
…ter the class has been modified.
@skybber Added unit tests for the MyBatis plugin code that I previously submitted. |
Great work , THANKS!!! |
@homejim |
Hi, @skybber : I downloaded the latest HotswapAgent code, then commented out all other unit test code for MyBatis, keeping only MyBatisPluginAnnoTest and removing @ignore. After compiling, I ran mvn test for the MyBatis plugin directly, and it worked fine. How can I reproduce the issue you mentioned? |
I see next (mvn clean package):
|
With
seems that the file is missing in target:
|
This is a different issue; it will ultimately not affect the unit test results。It sounds like there might be a conflict between |
I cloned a fresh HA repository and ran |
Okay. I wrote a HA plugin for MyBatis Plus. Should my code be a standalone MyBatis Plus plugin, or should it be combined with the MyBatis plugin?@skybber |
I'll leave it up to your decision. Generally:
|
thanks |
1.Add unit tests for #558:: When using annotation-based SQL, verify the reload after the class has been modified.
2.Add MybatisSpringBootTest to verify reload behavior in Spring Boot applications