diff --git a/pom.xml b/pom.xml
index 02f65e69ee46941403b72acdcbd7d2e572666b62..1e9ec51667198f1f83f38430a4e37544ef322329 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,12 +7,12 @@
com.myjdbc
myjdbc-dependencies
- 1.0
+ 1.0.4
com.myjdbc.web
myjdbc-web-mongodb
- 1.0.1
+ 1.0.2
8
@@ -51,6 +51,7 @@
org.apache.maven.plugins
maven-source-plugin
+ 3.2.1
attach-sources
diff --git a/src/main/java/com/myjdbc/web/mongodb/BaseMongoDao.java b/src/main/java/com/myjdbc/web/mongodb/BaseMongoDao.java
index 7bdd743e8f6ca6a19f73ddfc803cfea98d53dd13..0181a43708ea96be135c930df47d555bfa42d02b 100644
--- a/src/main/java/com/myjdbc/web/mongodb/BaseMongoDao.java
+++ b/src/main/java/com/myjdbc/web/mongodb/BaseMongoDao.java
@@ -139,6 +139,17 @@ public abstract class BaseMongoDao {
return mongoTemplate.remove(query, clazz).wasAcknowledged();
}
+ /**
+ * 删除数据
+ *
+ * @param data 待删除对象
+ *
+ * @return
+ */
+ public boolean delete(T data) {
+ return mongoTemplate.remove(data).wasAcknowledged();
+ }
+
/**
* 自动注入MongoId
*