From 4b6dda582ce32f5e0a51616fbecacb56eb2c8a9d Mon Sep 17 00:00:00 2001 From: TinyZ Date: Wed, 20 Jul 2016 14:11:31 +0800 Subject: [PATCH] =?UTF-8?q?Modify=20:=20=E4=BC=98=E5=8C=96Mybatis=E7=9A=84?= =?UTF-8?q?Mapper=E4=B8=BA=E9=80=9A=E8=BF=87Spring=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E6=B3=A8=E5=85=A5=E3=80=82=20=E5=8F=82=E8=80=83:MapperScannerC?= =?UTF-8?q?onfigurer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../okra/example/game/persistence/mapper/RoleMapper.java | 2 ++ okra-demo/src/main/resources/spring/beans.xml | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/okra-demo/src/main/java/org/ogcs/okra/example/game/persistence/mapper/RoleMapper.java b/okra-demo/src/main/java/org/ogcs/okra/example/game/persistence/mapper/RoleMapper.java index cafaa36..820fc06 100644 --- a/okra-demo/src/main/java/org/ogcs/okra/example/game/persistence/mapper/RoleMapper.java +++ b/okra-demo/src/main/java/org/ogcs/okra/example/game/persistence/mapper/RoleMapper.java @@ -21,7 +21,9 @@ import org.apache.ibatis.annotations.UpdateProvider; import org.ogcs.okra.example.game.persistence.domain.MemRole; import org.ogcs.okra.example.game.persistence.provider.RoleSqlProvider; +import org.springframework.stereotype.Component; +@Component("roleMapper") public interface RoleMapper { @InsertProvider(type = RoleSqlProvider.class, method = "insertSql") diff --git a/okra-demo/src/main/resources/spring/beans.xml b/okra-demo/src/main/resources/spring/beans.xml index d8a572c..5a5b526 100644 --- a/okra-demo/src/main/resources/spring/beans.xml +++ b/okra-demo/src/main/resources/spring/beans.xml @@ -42,7 +42,11 @@ - + + + + +