Comments (2)
Hi Sander,
mybatis-cdi only recognize Mappers injected with @mapped at least once. So
if you have a mapper but you do not inject it with @Mapper somewhere...
mybatis-cdi will ignore it.
Cheers,
Frank.
On Fri, Feb 19, 2016 at 5:39 AM, sander78 [email protected] wrote:
Hi there,
We use mybatis-cdi in combination with java8. With the default
implementation now possible in interfaces this maken code like this
possible.@Inject
public ItemRepoResolver(@Any Instance<ItemMapper<?>> itemMappers) {
this.itemMappers = itemMappers;
}So we inject a list of Mappers of type ItemMapper and each mapper can say
for which type it can be used. For example:`
public interface SavingsAccountMapper extends ItemMapper {..some mapper code...
@OverRide https://github.com/Override
default Class forType() {
return SavingsAccount.class;
}
}
`But since we do not use @Inject https://github.com/Inject @Mapper
https://github.com/Mapper SavingsAccountMapper this mapper is not
initialized. We can force this initialization by adding this field but we
do not need this.So my question/issue is. Is is possible to inject a list of Mybatis
Mappers without the need to inject them in fields individually?Thanks,
Sander—
Reply to this email directly or view it on GitHub
#30.
Frank D. Martínez M.
from cdi.
Okay that's what I figured :)
By the way I just found out it wouldn't work anyway as Mybatis does not accept a default implementation in the interface and will throw an Exception. Too bad.
Thanks
from cdi.
Related Issues (20)
- UnsatisfiedResolutionException: Api type [] is not found with the qualifiers... HOT 7
- Consider support JNDI obtain UserTransaction?
- Weld 3.1.7.Final Proxy changes has broken mybatis-cdi support HOT 1
- Create annotation to rollback exception by default HOT 1
- Upgrade to jakarta Namespace HOT 17
- UnsatisfiedResolutionException using aries-cdi 1.1.5 with karaf 4.3.7 HOT 1
- Dependency Dashboard
- Migrate from atomikos to narayana HOT 1
- Site plugin and 'clirr' usage issue with jakarta
- Clirr: Remove profile from maven.config file after no longer needing to compare to javax namespace
- missing @Any qualifier on MybatisBean if user provided qualifier is present
- How to modify java:comp/BeanManager to java:comp/env/BeanManager? HOT 13
- issue with micro profile standard HOT 1
- Release 1.0.3 HOT 4
- NoSuchElementException in test with Arquillian and embedded container HOT 10
- "WELD-001328: Unable to identify the correct BeanManager." occurs HOT 16
- Test issues - 8 of 13 can run concurrently / recent updates do not support oldest support revision of cdi/weld HOT 5
- github is behaving very strange... HOT 1
- mybatis-cdi-1.0.3 crashes in repeated requests HOT 2
- Release mybatis-cdi 1.1.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdi.