Browse Source

引入pass-mybatis 包

gaoyu 2 years ago
parent
commit
556f92c38f

+ 4 - 0
apm-mybatis/pom.xml

@@ -15,5 +15,9 @@
             <artifactId>apm-common</artifactId>
             <version>v1.3.0-SNAPSHOT</version><!--$NO-MVN-MAN-VER$-->
         </dependency>
+        <dependency>
+			<groupId>com.persagy</groupId>
+			<artifactId>starter-mybatis</artifactId>
+		</dependency>
     </dependencies>
 </project>

+ 2 - 0
apm-mybatis/src/main/java/com/persagy/apm/mybatis/handler/CommonMetaObjectHandler.java

@@ -5,6 +5,7 @@ import com.persagy.apm.common.constant.enums.ValidEnum;
 import com.persagy.apm.common.model.entity.AuditableEntity;
 import com.persagy.apm.common.model.entity.BaseEntity;
 import org.apache.ibatis.reflection.MetaObject;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Component;
 
 import java.util.Date;
@@ -16,6 +17,7 @@ import java.util.Date;
  * @since: 2020/9/9 2:10 下午
  * @version: V1.0
  **/
+@Primary
 @Component
 public class CommonMetaObjectHandler implements MetaObjectHandler {
     @Override

+ 5 - 0
apm-parent/pom.xml

@@ -87,6 +87,11 @@
 			</dependency>
 			<dependency>
 				<groupId>com.persagy</groupId>
+				<artifactId>starter-mybatis</artifactId>
+				<version>${passcloud.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>com.persagy</groupId>
 				<artifactId>starter-redis</artifactId>
 				<version>${passcloud.version}</version>
 			</dependency>