Skip to content
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

plugins-package option for application.yml #262

Closed
sathishk opened this issue Sep 15, 2018 · 3 comments
Closed

plugins-package option for application.yml #262

sathishk opened this issue Sep 15, 2018 · 3 comments
Labels

Comments

@sathishk
Copy link

As per the documentation we shall load type handlers using

type-handlers-package: com.xxx.yyy.typehandler

Is there anyway i shall load my plugin classes using application.yml ? something like

plugins-package: com.xxx.yyy.mybatis-plugin

@kazuki43zoo
Copy link
Member

kazuki43zoo commented Sep 27, 2018

@sathishk

The mybatis core module does not support to scan plugin classes. Therefore there are no plan to support it in this artifact at now. If you need to it ,please submit new feature request to mybatis core module.

As alternative, I propose to register your plugin classes to DI container using component scan feature provided by Spring core module as follow:

@Component
@Intercepts(...)
public class YourPluginClass implements Interceptor {
  // ...
}

The mybatis-spring-boot-autoconfigure provide the feature that detects automatically your plugin beans from DI container(ApplicationContext).

@kazuki43zoo kazuki43zoo changed the title pugins-package option for application.yml plugins-package option for application.yml Sep 30, 2018
@kazuki43zoo
Copy link
Member

@sathishk Could you provide a feedback? If not feedback, I will close this issue.

@kazuki43zoo
Copy link
Member

@sathishk

I've closed this issue because no reply form you.
If there is feedback, please reopen this issue.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants