My sqlSession.selectList() method is retrieving a list of VOs.
Do you guys know if it's possible for these VOs to be instantiated by Spring? I would like them to be able to control Spring SQL transactions. So far my VOs look like: @Component @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class AccountVO { @Autowired private InvoiceController invoiceController; } When I run the SELECT using MyBatis+Spring, the returned AccountVO "autowired properties" are not populated as I wished, but always null. Any insight would be greatly appreciated. Thanks in advance. Vlad -- You received this message because you are subscribed to the Google Groups "mybatis-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CAP3Y0VaHJDctWxFo5wJRtKO0QDsAAaRdEpNHuupreu5bf-QhqA%40mail.gmail.com. |
Hi Vlad,
I am not sure what that means, but it is possible to let MyBatis use Spring managed beans. You need to create a custom
Set this
Here is an executable demo: Regards, On Fri, May 24, 2019 at 11:11 PM Vladimir Alarcon <[hidden email]> wrote: My sqlSession.selectList() method is retrieving a list of VOs. You received this message because you are subscribed to the Google Groups "mybatis-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2Buep2Qeb9cX2oWsno0Sh_AmVo%2BzP_frq8kBkCP9sJPhJ8M_ng%40mail.gmail.com. |
Be careful a performance degradation when use the spring managed prototype bean. On Tuesday, May 28, 2019 at 10:52:10 PM UTC+9, Iwao AVE! wrote:
You received this message because you are subscribed to the Google Groups "mybatis-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/07b124d1-4525-4270-a657-caa26c63f5f6%40googlegroups.com. |
Free forum by Nabble | Edit this page |