HotswapProjects / HotswapAgent

Java unlimited redefinition of classes at runtime.
GNU General Public License v2.0
2.33k stars 491 forks source link

Mybatis Support #86

Open derekhsu opened 9 years ago

derekhsu commented 9 years ago

Great performance. Now I write code twice faster than before. Do you plan to provide a plugin supporting Mybatis likes Jrebel?

skybber commented 9 years ago

As I know nobody works on it now. Anyway It would be nice if we have support for Mybatis.

me10zyl commented 5 years ago

now support?

skybber commented 5 years ago

No, we're looking for help with this.

slieer commented 5 years ago

MyBatis is widely used by Java web developer. expects to be supported. Thanks.

HOTSWAP AGENT: 16:06:32.343 INFO (org.hotswap.agent.plugin.spring.scanner.XmlBeanRefreshCommand) - Executing XmlBeanDefinitionScannerAgent.reloadXml('file:/D:/xxxProject/target/pay/WEB-INF/classes/com/xxx/pay/mapping/UserStatisMapper.xml') HOTSWAP AGENT: 16:06:32.343 WARNING (org.hotswap.agent.plugin.spring.scanner.XmlBeanDefinationScannerAgent) - url file:/D:/svn_repo/qmz/pay/trunk/pay/target/pay/WEB-INF/classes/com/xxx/pay/mapping/UserStatisMapper.xml is not associated with any XmlBeanDefinationScannerAgent, not reloading

skybber commented 5 years ago

Our priority are frameworks we're working with. It's pretty hard to create / fix / maintain plugins that we are not using.

slieer commented 5 years ago

Thank you for your reply.

nagarajh908 commented 4 years ago

MyBatis or iBatis is widely used by Java web developer. expects to be supported.

HOTSWAP AGENT: 16:06:32.343 INFO (org.hotswap.agent.plugin.spring.scanner.XmlBeanRefreshCommand) - Executing XmlBeanDefinitionScannerAgent.reloadXml( ................ )*.xml is not associated with any XmlBeanDefinationScannerAgent, not reloading

skybber commented 4 years ago

HA has a new experimental MyBatis plugin now. It is available at HA releases starting from 1.3.1-SNAPHOT. We need testers now, since MyBatis configuration is pretty flexible and MyBatis is not my domain! Simple JUnit tests with Mapper reloading is working now:

https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-mybatis-plugin/src/test/java/org/hotswap/agent/plugin/mybatis/MyBatisPluginTest.java#L90

nagarajh908 commented 4 years ago

HA has a new experimental MyBatis plugin now. It is available at HA releases starting from 1.3.1-SNAPHOT. We need testers now, since MyBatis configuration is pretty flexible and MyBatis is not my domain! Simple JUnit tests with Mapper reloading is working now:

https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-mybatis-plugin/src/test/java/org/hotswap/agent/plugin/mybatis/MyBatisPluginTest.java#L90

HOTSWAP AGENT: 11:55:24.688 INFO (org.hotswap.agent.plugin.spring.scanner.XmlBeanRefreshCommand) - Executing XmlBeanDefinitionScannerAgent.reloadXml('ile:/C:{path}/main/resources/mybatis-resources/Mapper.xml') HOTSWAP AGENT: 11:55:24.713 WARNING (org.hotswap.agent.plugin.spring.scanner.XmlBeanDefinitionScannerAgent) - url file:/C:{path}/main/resources/mybatis-resources/Mapper.xml is not associated with any XmlBeanDefinitionScannerAgent, not reloading

skybber commented 4 years ago

It is warning from Spring plugin, you can just ignore it. Spring plugin considers all .xml files potential configuration files, we should change level of this message to debug.

derekhsu commented 4 years ago

I already forgot asking this support. LOL. Thanks for you effort. I tested it but I got the same warning message:

HOTSWAP AGENT: 17:07:45.324 WARNING (org.hotswap.agent.plugin.spring.scanner.XmlBeanDefinitionScannerAgent) - url file:/D:/Project/csc/sc/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/java-case-sc/WEB-INF/classes/com/csc/sc/db/sql/host/db2/TBSC00A1.xml is not associated with any XmlBeanDefinitionScannerAgent, not reloading

And it indeed didn't reload the SQL Map file. What should I do further to solve this problem?

skybber commented 4 years ago

It is warning from SpringPlugin. Mybatis setup can be complex and it is hard to solve all the corner cases. Could you make small project demonstrating your problem?

derekhsu commented 4 years ago

OK, I am going to try it.

rohityadav225 commented 4 years ago

I am using the latest hotswapagent version and i still see mybatis warning message

is not associated with any XmlBeanDefinitionScannerAgent, not reloading
skybber commented 4 years ago

You can ignore this message, it is from SpringPlugin