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

I wish add the plugins deal in mybatis-config.xml #208

Open
rengang66 opened this issue Jul 16, 2022 · 8 comments
Open

I wish add the plugins deal in mybatis-config.xml #208

rengang66 opened this issue Jul 16, 2022 · 8 comments

Comments

@rengang66
Copy link

for example ,my mybatis-config.xml has content:

In MyBatis extension ,The plugin needs to be processed in the method setupconfiguration in the MyBatisProcessor Class.

@rengang66
Copy link
Author

No description provided.

@rengang66
Copy link
Author

<plugins>
	<plugin interceptor="com.github.pagehelper.PageInterceptor">			
			<property name="helperDialect" value="mysql" />
			<property name="supportMethodsArguments" value="true" />
			<property name="params" value="count=countSql" />
	</plugin>
</plugins>``

@zhfeng
Copy link
Collaborator

zhfeng commented Jul 17, 2022

It would be helpful if you can provide a simple example or test for using plugins. I think it should work in JVM mode but maybe need some tricks to work in Native mode.

@wenpengpeng
Copy link

<plugins>
	<plugin interceptor="com.github.pagehelper.PageInterceptor">			
			<property name="helperDialect" value="mysql" />
			<property name="supportMethodsArguments" value="true" />
			<property name="params" value="count=countSql" />
	</plugin>
</plugins>``

Have you achieved it? How should it be implemented?

@zhfeng
Copy link
Collaborator

zhfeng commented Apr 18, 2023

I'm not very sure that <plugins> is supported in mybatis. If it does, I think we need a test to verify if it works.

@wenpengpeng
Copy link

<plugins>
	<plugin interceptor="com.github.pagehelper.PageInterceptor">			
			<property name="helperDialect" value="mysql" />
			<property name="supportMethodsArguments" value="true" />
			<property name="params" value="count=countSql" />
	</plugin>
</plugins>``

Have you achieved it? How should it be implemented?

if you want use PageHelper you can see this link:
#166

@zhfeng
Copy link
Collaborator

zhfeng commented Apr 18, 2023

I see but it looks like with mybatis-plus but not mybatis?

@wenpengpeng
Copy link

I see but it looks like with mybatis-plus but not mybatis?

you can use it in the same way.

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

No branches or pull requests

3 participants