-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add @MybatisTest similar to @DataJpaTest #143
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
Conversation
|
Thanks for the PR @wonwoo it is great! I will take a look |
|
@wonwoo can you add new tests to the existing modules in |
| @Documented | ||
| @Inherited | ||
| @ImportAutoConfiguration | ||
| public @interface AutoConfigureDataMybatis { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to AutoConfigureMybatis
| @AutoConfigureCache | ||
| @Transactional | ||
| @AutoConfigureDataMybatis | ||
| public @interface DataMybatisTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to MybatisTest
| /** | ||
| * | ||
| * @author wonwoo | ||
| * note : spring boot 1.5 add method excludeAutoConfiguration() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this note
|
|
||
| /** | ||
| * {@link TypeExcludeFilter} for {@link DataMybatisTest @DataMybatisTest}. | ||
| * note : Spring boot 1.5 add method getComponentIncludes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this note
| * @author wonwoo | ||
| * @since 1.2.1 | ||
| */ | ||
| class DataMybatisTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to MybatisTypeExcludeFilter
|
@eddumelendez rename class and remove note... and.. created sample code |
eddumelendez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just few comments after everything is ok. Thanks again @wonwoo
mybatis-spring-boot-samples/pom.xml
Outdated
| <modules> | ||
| <module>mybatis-spring-boot-sample-annotation</module> | ||
| <module>mybatis-spring-boot-sample-xml</module> | ||
| <module>mybatis-spring-boot-sample-test</module> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new module is not necessary just add new test for the existing ones. Sorry to not be clear.
| import org.springframework.test.context.BootstrapWith; | ||
| import org.springframework.transaction.annotation.Transactional; | ||
|
|
||
| import java.lang.annotation.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid import *
| @@ -0,0 +1,7 @@ | |||
| # AutoConfigureDataMybatis auto-configuration imports | |||
| org.mybatis.spring.boot.test.autoconfigure.AutoConfigureMybatis=\ | |||
| org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove whitespace at the beginning
|
@eddumelendez remove test module and created test code in |
* pr/143: Polish contribution Add test slice for pure mybatis tests
|
Merged. Thanks! |
|
I've changed title and description. |
|
Is not need to include
|
|
ping @eddumelendez |
|
ping @eddumelendez WDYT about #143 (comment) ? |
|
Thanks for the reminder @kazuki43zoo check cfeeff4 |
|
@eddumelendez Thanks for fix !! |
|
I've updated document via 7ac4b24. |
Hello everybody,
this @wonwoo
@MybatisTestsimilar to@DataJpaTest.You can easily test Mybatis.
are you okay?
Thank you in advance.