MapperScan excludeFilters support

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MapperScan excludeFilters support

Xyz Amos
could `@MapperScan` annotaion support `excludeFilter`?
I write a base abstract mapper and put it into my mapper package, but i don't want it to be scanned as a bean.
I can only figure out three solutions:
  1.move the abstract mapper to another package, which seems stupid
  2.similar to 1,put the abstract mapper  to `mapper.base` and others to `mapper.whateverlelse`
  2.add`@Component` or `@Repository` to every mapper rather than using `@MapperScan` automatically

--
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].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: MapperScan excludeFilters support

Kazuki Shimizu
> could `@MapperScan` annotaion support `excludeFilter`?
Not supported.

The MyBatis provide @Mapper annotation for marking mapper interface. You can specify it at every mapper files, and specify {@MapperScan(annotationClass=Mapper.class)} at config file.
The @Mapper annotation is used to scan mapper interface in mybatis-spring-boot-autoconfigure already.

Thanks.

On Monday, April 10, 2017 at 6:53:40 PM UTC+9, Xyz Amos wrote:
could `@MapperScan` annotaion support `excludeFilter`?
I write a base abstract mapper and put it into my mapper package, but i don't want it to be scanned as a bean.
I can only figure out three solutions:
  1.move the abstract mapper to another package, which seems stupid
  2.similar to 1,put the abstract mapper  to `mapper.base` and others to `mapper.whateverlelse`
  2.add`@Component` or `@Repository` to every mapper rather than using `@MapperScan` automatically

--
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].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: MapperScan excludeFilters support

Xyz Amos
thanks

2017-04-11 1:18 GMT+08:00 Kazuki Shimizu <[hidden email]>:
> could `@MapperScan` annotaion support `excludeFilter`?
Not supported.

The MyBatis provide @Mapper annotation for marking mapper interface. You can specify it at every mapper files, and specify {@MapperScan(annotationClass=Mapper.class)} at config file.
The @Mapper annotation is used to scan mapper interface in mybatis-spring-boot-autoconfigure already.

Thanks.


On Monday, April 10, 2017 at 6:53:40 PM UTC+9, Xyz Amos wrote:
could `@MapperScan` annotaion support `excludeFilter`?
I write a base abstract mapper and put it into my mapper package, but i don't want it to be scanned as a bean.
I can only figure out three solutions:
  1.move the abstract mapper to another package, which seems stupid
  2.similar to 1,put the abstract mapper  to `mapper.base` and others to `mapper.whateverlelse`
  2.add`@Component` or `@Repository` to every mapper rather than using `@MapperScan` automatically

--
You received this message because you are subscribed to a topic in the Google Groups "mybatis-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mybatis-user/65IypFzVdJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
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].
For more options, visit https://groups.google.com/d/optout.