Skip to content

Use declared class's package as base package if not present base packages on @MapperScan #438

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

Merged
merged 5 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
added i18n docs
  • Loading branch information
tacoo committed Dec 13, 2019
commit a9fce71a747ff8773d2aa452b6ba8912098f3642
6 changes: 5 additions & 1 deletion src/site/es/xdoc/mappers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ public class AppConfig {
Tambien puedes indicar una <code>SqlSessionFactory</code> o un <code>SqlSessionTemplate</code> específicos
mediante las propiedades <code>sqlSessionFactory</code> y <code>sqlSessionTemplate</code>.
</p>


<p>
<span class="label important">NOTE</span> Since 2.0.4, If <code>basePackageClasses</code> or <code>basePackages</code> are not defined, scanning will occur from the package of the class that declares this annotation.
</p>

<h4>MapperScannerConfigurer</h4>

<p>
Expand Down
6 changes: 5 additions & 1 deletion src/site/ja/xdoc/mappers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ public class AppConfig {
このアノテーションは前章で説明した <code>&lt;mybatis:scan/&gt;</code> と全く同じ要領で Mapper の検出を行います。
引数 <code>markerInterface</code>, <code>annotationClass</code> を使えば検出対象のマーカーインターフェイスとアノテーションを指定することもできますし、<code>sqlSessionFactory</code>, <code>sqlSessionTemplate</code> で <code>SqlSessionFactory</code> や <code>SqlSessionTemplate</code> を指定することができます。
</p>


<p>
<span class="label important">NOTE</span> 2.0.4以降では、 <code>basePackageClasses</code> もしくは <code>basePackages</code> が指定されていない場合、このアノテーションが定義されているクラスのパッケージを基準にスキャンします。
</p>

<h4>MapperScannerConfigurer</h4>

<p>
Expand Down
6 changes: 5 additions & 1 deletion src/site/ko/xdoc/mappers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ public class AppConfig {
<code>markerInterface</code> 와 <code>annotationClass</code> 프로퍼티를 사용해서 마커 인터페이스와 애노테이션 클래스를 명시하게 한다.
<code>sqlSessionFactory</code> 와 <code>sqlSessionTemplate</code> 프로퍼티를 사용해서
<code>SqlSessionFactory</code> 나 <code>SqlSessionTemplate</code>을 제공할 수도 있다. </p>


<p>
<span class="label important">NOTE</span> Since 2.0.4, If <code>basePackageClasses</code> or <code>basePackages</code> are not defined, scanning will occur from the package of the class that declares this annotation.
</p>

<h4>MapperScannerConfigurer</h4>

<p><code>MapperScannerConfigurer</code>는 평범한 빈처럼 XML애플리케이션 컨텍스트에 포함된 <code>BeanDefinitionRegistryPostProcessor</code> 이다.
Expand Down
4 changes: 4 additions & 0 deletions src/site/zh/xdoc/mappers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ public class AppConfig {
这个注解具有与之前见过的 <code>&lt;mybatis:scan/&gt;</code> 元素一样的工作方式。它也可以通过 <code>markerInterface</code> 和 <code>annotationClass</code> 属性设置标记接口或注解类。通过配置 <code>sqlSessionFactory</code> 和 <code>sqlSessionTemplate</code> 属性,你还能指定一个 <code>SqlSessionFactory</code> 或 <code>SqlSessionTemplate</code>。
</p>

<p>
<span class="label important">NOTE</span> Since 2.0.4, If <code>basePackageClasses</code> or <code>basePackages</code> are not defined, scanning will occur from the package of the class that declares this annotation.
</p>

<h4>MapperScannerConfigurer</h4>

<p>
Expand Down