diff --git a/pom.xml b/pom.xml
index 1600b32..30bb6bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,160 +2,124 @@
- 4.0.0
+ 4.0.0
- com.lanyuanxiaoyao
- spring-boot-service-template
- 1.0.0-SNAPSHOT
+ com.lanyuanxiaoyao
+ spring-boot-service-template
+ 1.1.0-SNAPSHOT
+ pom
-
- 17
- 17
- UTF-8
+
+ spring-boot-service-template-common
+ spring-boot-service-template-jpa
+ spring-boot-service-template-task
+
- 3.5.0
- 2025.0.0
- 6.6.15.Final
- 3.1.0
- 7.0
- 1.6.3
- 1.5.0
-
+
+ 17
+ 17
+ UTF-8
+ 3.5.0
+ 2025.0.0
+ 6.6.15.Final
+ 3.1.0
+ 7.0
+ 1.6.3
+ 1.5.0
+
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
-
- org.springframework.boot
- spring-boot-starter-web
- provided
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
- com.blinkfox
- fenix-spring-boot-starter
- ${fenix.version}
-
-
- io.github.openfeign.querydsl
- querydsl-jpa
- ${querydsl.version}
-
+
+ com.lanyuanxiaoyao
+ spring-boot-service-template-common
+ ${project.version}
+
-
- org.hibernate.orm
- hibernate-ant
- ${hibernate.version}
-
+
+
+ org.springframework.boot
+ spring-boot-dependencies
+ ${spring-boot.version}
+ pom
+ import
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring-cloud.version}
+ pom
+ import
+
-
- org.mapstruct
- mapstruct
- ${mapstruct.version}
- compile
-
+
+ com.blinkfox
+ fenix-spring-boot-starter
+ ${fenix.version}
+
+
+ io.github.openfeign.querydsl
+ querydsl-jpa
+ ${querydsl.version}
+
-
- org.projectlombok
- lombok
-
+
+ org.hibernate.orm
+ hibernate-ant
+ ${hibernate.version}
+
-
- org.jspecify
- jspecify
- 1.0.0
-
+
+ org.mapstruct
+ mapstruct
+ ${mapstruct.version}
+ compile
+
-
- com.h2database
- h2
- test
-
+
+ org.jspecify
+ jspecify
+ 1.0.0
+
+
-
-
-
-
- org.springframework.boot
- spring-boot-dependencies
- ${spring-boot.version}
- pom
- import
-
-
- org.springframework.cloud
- spring-cloud-dependencies
- ${spring-cloud.version}
- pom
- import
-
-
-
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.3.1
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.14.0
+
+
+
+
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 3.3.1
-
-
- package
-
- jar-no-fork
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.14.0
-
-
-
- org.projectlombok
- lombok
-
-
- org.hibernate
- hibernate-jpamodelgen
- ${hibernate.version}
-
-
- io.github.openfeign.querydsl
- querydsl-apt
- ${querydsl.version}
- jpa
-
-
- jakarta.persistence
- jakarta.persistence-api
- 3.2.0
-
-
-
- -Aquerydsl.entityAccessors=true
- -Aquerydsl.createDefaultVariable=true
-
-
-
-
-
-
-
-
- ${releases.id}
- ${releases.name}
- ${releases.url}
-
-
- ${snapshots.id}
- ${snapshots.name}
- ${snapshots.url}
-
-
+
+
+ ${releases.id}
+ ${releases.name}
+ ${releases.url}
+
+
+ ${snapshots.id}
+ ${snapshots.name}
+ ${snapshots.url}
+
+
\ No newline at end of file
diff --git a/spring-boot-service-template-common/pom.xml b/spring-boot-service-template-common/pom.xml
new file mode 100644
index 0000000..a7ea47a
--- /dev/null
+++ b/spring-boot-service-template-common/pom.xml
@@ -0,0 +1,30 @@
+
+
+ 4.0.0
+
+ com.lanyuanxiaoyao
+ spring-boot-service-template
+ 1.1.0-SNAPSHOT
+
+
+ spring-boot-service-template-common
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ package
+
+ jar-no-fork
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/helper/ObjectHelper.java b/spring-boot-service-template-common/src/main/java/com/lanyuanxiaoyao/service/template/common/helper/ObjectHelper.java
similarity index 98%
rename from src/main/java/com/lanyuanxiaoyao/service/template/helper/ObjectHelper.java
rename to spring-boot-service-template-common/src/main/java/com/lanyuanxiaoyao/service/template/common/helper/ObjectHelper.java
index 14a6d3e..322fbf7 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/helper/ObjectHelper.java
+++ b/spring-boot-service-template-common/src/main/java/com/lanyuanxiaoyao/service/template/common/helper/ObjectHelper.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.helper;
+package com.lanyuanxiaoyao.service.template.common.helper;
import java.util.Collection;
import java.util.Map;
diff --git a/spring-boot-service-template-jpa/pom.xml b/spring-boot-service-template-jpa/pom.xml
new file mode 100644
index 0000000..891ac5b
--- /dev/null
+++ b/spring-boot-service-template-jpa/pom.xml
@@ -0,0 +1,109 @@
+
+
+ 4.0.0
+
+ com.lanyuanxiaoyao
+ spring-boot-service-template
+ 1.1.0-SNAPSHOT
+
+
+ spring-boot-service-template-jpa
+
+
+
+ com.lanyuanxiaoyao
+ spring-boot-service-template-common
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ provided
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ com.blinkfox
+ fenix-spring-boot-starter
+
+
+ io.github.openfeign.querydsl
+ querydsl-jpa
+
+
+
+ org.hibernate.orm
+ hibernate-ant
+
+
+
+ org.mapstruct
+ mapstruct
+ compile
+
+
+
+ org.jspecify
+ jspecify
+
+
+
+ com.h2database
+ h2
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ package
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+ org.hibernate
+ hibernate-jpamodelgen
+ ${hibernate.version}
+
+
+ io.github.openfeign.querydsl
+ querydsl-apt
+ ${querydsl.version}
+ jpa
+
+
+ jakarta.persistence
+ jakarta.persistence-api
+ 3.2.0
+
+
+
+ -Aquerydsl.entityAccessors=true
+ -Aquerydsl.createDefaultVariable=true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/Helper.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/Helper.java
similarity index 99%
rename from src/main/java/com/lanyuanxiaoyao/service/template/Helper.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/Helper.java
index cb5d9ee..718b127 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/Helper.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/Helper.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template;
+package com.lanyuanxiaoyao.service.template.jpa;
import jakarta.persistence.Entity;
import java.io.IOException;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/DetailController.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/DetailController.java
similarity index 90%
rename from src/main/java/com/lanyuanxiaoyao/service/template/controller/DetailController.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/DetailController.java
index 3adfd16..94bba5f 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/DetailController.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/DetailController.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
/**
* 详情控制器接口,用于定义统一的获取实体详情的接口规范
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/GlobalResponse.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/GlobalResponse.java
similarity index 97%
rename from src/main/java/com/lanyuanxiaoyao/service/template/controller/GlobalResponse.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/GlobalResponse.java
index e1575fe..df24b6a 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/GlobalResponse.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/GlobalResponse.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
import java.util.Map;
import lombok.Getter;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/ListController.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/ListController.java
similarity index 97%
rename from src/main/java/com/lanyuanxiaoyao/service/template/controller/ListController.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/ListController.java
index e0f97fe..7f6d5a1 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/ListController.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/ListController.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
import java.util.Map;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/Query.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/Query.java
similarity index 99%
rename from src/main/java/com/lanyuanxiaoyao/service/template/controller/Query.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/Query.java
index cd767d1..7665758 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/Query.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/Query.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
import java.util.List;
import java.util.Map;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/RemoveController.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/RemoveController.java
similarity index 90%
rename from src/main/java/com/lanyuanxiaoyao/service/template/controller/RemoveController.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/RemoveController.java
index 6ef5007..05d7e92 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/RemoveController.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/RemoveController.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
/**
* 删除控制器接口,用于定义统一的删除实体对象的接口规范
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/SaveController.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SaveController.java
similarity index 91%
rename from src/main/java/com/lanyuanxiaoyao/service/template/controller/SaveController.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SaveController.java
index e6e4291..62c7091 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/SaveController.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SaveController.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
/**
* 保存控制器接口,用于定义统一的保存实体对象的接口规范
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/SimpleController.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SimpleController.java
similarity index 75%
rename from src/main/java/com/lanyuanxiaoyao/service/template/controller/SimpleController.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SimpleController.java
index 53aa280..4485642 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/SimpleController.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SimpleController.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
public interface SimpleController extends SaveController, ListController, DetailController, RemoveController {
}
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/controller/SimpleControllerSupport.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SimpleControllerSupport.java
similarity index 96%
rename from src/main/java/com/lanyuanxiaoyao/service/template/controller/SimpleControllerSupport.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SimpleControllerSupport.java
index ed365e5..e8f9355 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/controller/SimpleControllerSupport.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/controller/SimpleControllerSupport.java
@@ -1,8 +1,8 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
-import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
-import com.lanyuanxiaoyao.service.template.helper.ObjectHelper;
-import com.lanyuanxiaoyao.service.template.service.SimpleServiceSupport;
+import com.lanyuanxiaoyao.service.template.common.helper.ObjectHelper;
+import com.lanyuanxiaoyao.service.template.jpa.entity.SimpleEntity;
+import com.lanyuanxiaoyao.service.template.jpa.service.SimpleServiceSupport;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/entity/IdOnlyEntity.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/entity/IdOnlyEntity.java
similarity index 92%
rename from src/main/java/com/lanyuanxiaoyao/service/template/entity/IdOnlyEntity.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/entity/IdOnlyEntity.java
index b531473..9cec640 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/entity/IdOnlyEntity.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/entity/IdOnlyEntity.java
@@ -1,6 +1,6 @@
-package com.lanyuanxiaoyao.service.template.entity;
+package com.lanyuanxiaoyao.service.template.jpa.entity;
-import com.lanyuanxiaoyao.service.template.helper.SnowflakeId;
+import com.lanyuanxiaoyao.service.template.jpa.helper.SnowflakeId;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.Id;
import jakarta.persistence.MappedSuperclass;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/entity/SimpleEntity.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/entity/SimpleEntity.java
similarity index 97%
rename from src/main/java/com/lanyuanxiaoyao/service/template/entity/SimpleEntity.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/entity/SimpleEntity.java
index 9ae743f..50e39f7 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/entity/SimpleEntity.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/entity/SimpleEntity.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.entity;
+package com.lanyuanxiaoyao.service.template.jpa.entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/helper/SnowflakeId.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/helper/SnowflakeId.java
similarity index 87%
rename from src/main/java/com/lanyuanxiaoyao/service/template/helper/SnowflakeId.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/helper/SnowflakeId.java
index f42da4b..89720eb 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/helper/SnowflakeId.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/helper/SnowflakeId.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.helper;
+package com.lanyuanxiaoyao.service.template.jpa.helper;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/helper/SnowflakeIdGenerator.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/helper/SnowflakeIdGenerator.java
similarity index 97%
rename from src/main/java/com/lanyuanxiaoyao/service/template/helper/SnowflakeIdGenerator.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/helper/SnowflakeIdGenerator.java
index 9f20a36..a68b790 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/helper/SnowflakeIdGenerator.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/helper/SnowflakeIdGenerator.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.helper;
+package com.lanyuanxiaoyao.service.template.jpa.helper;
import java.io.Serializable;
import java.time.Instant;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/repository/SimpleRepository.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/repository/SimpleRepository.java
similarity index 95%
rename from src/main/java/com/lanyuanxiaoyao/service/template/repository/SimpleRepository.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/repository/SimpleRepository.java
index 2ac33fa..2dd37bd 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/repository/SimpleRepository.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/repository/SimpleRepository.java
@@ -1,12 +1,10 @@
-package com.lanyuanxiaoyao.service.template.repository;
+package com.lanyuanxiaoyao.service.template.jpa.repository;
import com.blinkfox.fenix.jpa.FenixJpaRepository;
import com.blinkfox.fenix.specification.FenixJpaSpecificationExecutor;
import org.springframework.data.querydsl.ListQuerydslPredicateExecutor;
-import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.query.ListQueryByExampleExecutor;
-import org.springframework.data.repository.query.QueryByExampleExecutor;
/**
* 简单仓库接口,整合多种数据访问功能
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleService.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/service/SimpleService.java
similarity index 76%
rename from src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleService.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/service/SimpleService.java
index 3d990e0..afdb8ed 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleService.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/service/SimpleService.java
@@ -1,7 +1,7 @@
-package com.lanyuanxiaoyao.service.template.service;
+package com.lanyuanxiaoyao.service.template.jpa.service;
-import com.lanyuanxiaoyao.service.template.controller.Query;
-import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
+import com.lanyuanxiaoyao.service.template.jpa.controller.Query;
+import com.lanyuanxiaoyao.service.template.jpa.entity.SimpleEntity;
import java.util.List;
import java.util.Set;
import org.springframework.data.domain.Page;
diff --git a/src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleServiceSupport.java b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/service/SimpleServiceSupport.java
similarity index 98%
rename from src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleServiceSupport.java
rename to spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/service/SimpleServiceSupport.java
index b026cdb..cf80c28 100644
--- a/src/main/java/com/lanyuanxiaoyao/service/template/service/SimpleServiceSupport.java
+++ b/spring-boot-service-template-jpa/src/main/java/com/lanyuanxiaoyao/service/template/jpa/service/SimpleServiceSupport.java
@@ -1,10 +1,10 @@
-package com.lanyuanxiaoyao.service.template.service;
+package com.lanyuanxiaoyao.service.template.jpa.service;
-import com.lanyuanxiaoyao.service.template.controller.Query;
-import com.lanyuanxiaoyao.service.template.entity.IdOnlyEntity;
-import com.lanyuanxiaoyao.service.template.entity.SimpleEntity;
-import com.lanyuanxiaoyao.service.template.helper.ObjectHelper;
-import com.lanyuanxiaoyao.service.template.repository.SimpleRepository;
+import com.lanyuanxiaoyao.service.template.common.helper.ObjectHelper;
+import com.lanyuanxiaoyao.service.template.jpa.controller.Query;
+import com.lanyuanxiaoyao.service.template.jpa.entity.IdOnlyEntity;
+import com.lanyuanxiaoyao.service.template.jpa.entity.SimpleEntity;
+import com.lanyuanxiaoyao.service.template.jpa.repository.SimpleRepository;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.CriteriaQuery;
import jakarta.persistence.criteria.Path;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/HelperTest.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/HelperTest.java
similarity index 98%
rename from src/test/java/com/lanyuanxiaoyao/service/template/HelperTest.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/HelperTest.java
index 304bd24..cdddc77 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/HelperTest.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/HelperTest.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template;
+package com.lanyuanxiaoyao.service.template.jpa;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/TestApplication.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/TestApplication.java
similarity index 95%
rename from src/test/java/com/lanyuanxiaoyao/service/template/TestApplication.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/TestApplication.java
index 393931e..8034931 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/TestApplication.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/TestApplication.java
@@ -1,17 +1,17 @@
-package com.lanyuanxiaoyao.service.template;
+package com.lanyuanxiaoyao.service.template.jpa;
import com.blinkfox.fenix.EnableFenix;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.lanyuanxiaoyao.service.template.entity.Company;
-import com.lanyuanxiaoyao.service.template.entity.Company_;
-import com.lanyuanxiaoyao.service.template.entity.Employee;
-import com.lanyuanxiaoyao.service.template.entity.Employee_;
-import com.lanyuanxiaoyao.service.template.entity.QEmployee;
-import com.lanyuanxiaoyao.service.template.entity.Report;
-import com.lanyuanxiaoyao.service.template.entity.Report_;
-import com.lanyuanxiaoyao.service.template.repository.EmployeeRepository;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Company;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Company_;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Employee;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Employee_;
+import com.lanyuanxiaoyao.service.template.jpa.entity.QEmployee;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Report;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Report_;
+import com.lanyuanxiaoyao.service.template.jpa.repository.EmployeeRepository;
import jakarta.annotation.Resource;
import java.util.List;
import org.slf4j.Logger;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/controller/CompanyController.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/CompanyController.java
similarity index 89%
rename from src/test/java/com/lanyuanxiaoyao/service/template/controller/CompanyController.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/CompanyController.java
index 1357af3..6cb12d8 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/controller/CompanyController.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/CompanyController.java
@@ -1,7 +1,7 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
-import com.lanyuanxiaoyao.service.template.entity.Company;
-import com.lanyuanxiaoyao.service.template.service.CompanyService;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Company;
+import com.lanyuanxiaoyao.service.template.jpa.service.CompanyService;
import java.time.LocalDateTime;
import java.util.function.Function;
import org.springframework.web.bind.annotation.RequestMapping;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/controller/EmployeeController.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/EmployeeController.java
similarity index 88%
rename from src/test/java/com/lanyuanxiaoyao/service/template/controller/EmployeeController.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/EmployeeController.java
index edc535b..2854888 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/controller/EmployeeController.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/EmployeeController.java
@@ -1,8 +1,8 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
-import com.lanyuanxiaoyao.service.template.entity.Employee;
-import com.lanyuanxiaoyao.service.template.service.CompanyService;
-import com.lanyuanxiaoyao.service.template.service.EmployeeService;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Employee;
+import com.lanyuanxiaoyao.service.template.jpa.service.CompanyService;
+import com.lanyuanxiaoyao.service.template.jpa.service.EmployeeService;
import java.time.LocalDateTime;
import java.util.function.Function;
import org.springframework.web.bind.annotation.RequestMapping;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/controller/ReportController.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/ReportController.java
similarity index 89%
rename from src/test/java/com/lanyuanxiaoyao/service/template/controller/ReportController.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/ReportController.java
index 0fdd698..56242d7 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/controller/ReportController.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/controller/ReportController.java
@@ -1,8 +1,8 @@
-package com.lanyuanxiaoyao.service.template.controller;
+package com.lanyuanxiaoyao.service.template.jpa.controller;
-import com.lanyuanxiaoyao.service.template.entity.Report;
-import com.lanyuanxiaoyao.service.template.service.EmployeeService;
-import com.lanyuanxiaoyao.service.template.service.ReportService;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Report;
+import com.lanyuanxiaoyao.service.template.jpa.service.EmployeeService;
+import com.lanyuanxiaoyao.service.template.jpa.service.ReportService;
import java.time.LocalDateTime;
import java.util.function.Function;
import org.springframework.web.bind.annotation.RequestMapping;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/entity/Company.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Company.java
similarity index 96%
rename from src/test/java/com/lanyuanxiaoyao/service/template/entity/Company.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Company.java
index 80c1df8..b787abe 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/entity/Company.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Company.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.entity;
+package com.lanyuanxiaoyao.service.template.jpa.entity;
import jakarta.persistence.Column;
import jakarta.persistence.ConstraintMode;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/entity/Employee.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Employee.java
similarity index 97%
rename from src/test/java/com/lanyuanxiaoyao/service/template/entity/Employee.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Employee.java
index fe509e4..4ca8cd0 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/entity/Employee.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Employee.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.entity;
+package com.lanyuanxiaoyao.service.template.jpa.entity;
import jakarta.persistence.Column;
import jakarta.persistence.ConstraintMode;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/entity/Report.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Report.java
similarity index 95%
rename from src/test/java/com/lanyuanxiaoyao/service/template/entity/Report.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Report.java
index 2a28f4f..c6662f3 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/entity/Report.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/Report.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.entity;
+package com.lanyuanxiaoyao.service.template.jpa.entity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/entity/vo/EmployeeWithCompanyName.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/vo/EmployeeWithCompanyName.java
similarity index 67%
rename from src/test/java/com/lanyuanxiaoyao/service/template/entity/vo/EmployeeWithCompanyName.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/vo/EmployeeWithCompanyName.java
index 7ffa2b6..819fb87 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/entity/vo/EmployeeWithCompanyName.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/entity/vo/EmployeeWithCompanyName.java
@@ -1,4 +1,4 @@
-package com.lanyuanxiaoyao.service.template.entity.vo;
+package com.lanyuanxiaoyao.service.template.jpa.entity.vo;
public record EmployeeWithCompanyName(
String name,
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/repository/CompanyRepository.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/CompanyRepository.java
similarity index 52%
rename from src/test/java/com/lanyuanxiaoyao/service/template/repository/CompanyRepository.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/CompanyRepository.java
index 3488726..8e0976a 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/repository/CompanyRepository.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/CompanyRepository.java
@@ -1,6 +1,6 @@
-package com.lanyuanxiaoyao.service.template.repository;
+package com.lanyuanxiaoyao.service.template.jpa.repository;
-import com.lanyuanxiaoyao.service.template.entity.Company;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Company;
import org.springframework.stereotype.Repository;
@Repository
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/repository/EmployeeRepository.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/EmployeeRepository.java
similarity index 66%
rename from src/test/java/com/lanyuanxiaoyao/service/template/repository/EmployeeRepository.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/EmployeeRepository.java
index cbc22da..b2e3aa6 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/repository/EmployeeRepository.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/EmployeeRepository.java
@@ -1,7 +1,7 @@
-package com.lanyuanxiaoyao.service.template.repository;
+package com.lanyuanxiaoyao.service.template.jpa.repository;
-import com.lanyuanxiaoyao.service.template.entity.Employee;
-import com.lanyuanxiaoyao.service.template.entity.vo.EmployeeWithCompanyName;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Employee;
+import com.lanyuanxiaoyao.service.template.jpa.entity.vo.EmployeeWithCompanyName;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.domain.Specification;
@@ -19,6 +19,6 @@ public interface EmployeeRepository extends SimpleRepository {
@Query(value = "select e.name, c.name, e.age, e.role from employee e, company c where e.company_id = c.id", nativeQuery = true)
List findAllEmployeeWithCompanyNameNative();
- @Query("select new com.lanyuanxiaoyao.service.template.entity.vo.EmployeeWithCompanyName(employee.name, employee.company.name, employee.age, cast(employee.role as string)) from Employee employee")
+ @Query("select new com.lanyuanxiaoyao.service.template.jpa.entity.vo.EmployeeWithCompanyName(employee.name, employee.company.name, employee.age, cast(employee.role as string)) from Employee employee")
List findAllEmployeeWithCompanyName();
}
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/repository/ReportRepository.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/ReportRepository.java
similarity index 52%
rename from src/test/java/com/lanyuanxiaoyao/service/template/repository/ReportRepository.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/ReportRepository.java
index 1b31d17..e1ca64c 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/repository/ReportRepository.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/repository/ReportRepository.java
@@ -1,6 +1,6 @@
-package com.lanyuanxiaoyao.service.template.repository;
+package com.lanyuanxiaoyao.service.template.jpa.repository;
-import com.lanyuanxiaoyao.service.template.entity.Report;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Report;
import org.springframework.stereotype.Repository;
@Repository
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/service/CompanyService.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/CompanyService.java
similarity index 51%
rename from src/test/java/com/lanyuanxiaoyao/service/template/service/CompanyService.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/CompanyService.java
index 1793f37..8223100 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/service/CompanyService.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/CompanyService.java
@@ -1,7 +1,7 @@
-package com.lanyuanxiaoyao.service.template.service;
+package com.lanyuanxiaoyao.service.template.jpa.service;
-import com.lanyuanxiaoyao.service.template.entity.Company;
-import com.lanyuanxiaoyao.service.template.repository.CompanyRepository;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Company;
+import com.lanyuanxiaoyao.service.template.jpa.repository.CompanyRepository;
import org.springframework.stereotype.Service;
@Service
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/service/EmployeeService.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/EmployeeService.java
similarity index 51%
rename from src/test/java/com/lanyuanxiaoyao/service/template/service/EmployeeService.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/EmployeeService.java
index f9886b3..ea3d250 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/service/EmployeeService.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/EmployeeService.java
@@ -1,7 +1,7 @@
-package com.lanyuanxiaoyao.service.template.service;
+package com.lanyuanxiaoyao.service.template.jpa.service;
-import com.lanyuanxiaoyao.service.template.entity.Employee;
-import com.lanyuanxiaoyao.service.template.repository.EmployeeRepository;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Employee;
+import com.lanyuanxiaoyao.service.template.jpa.repository.EmployeeRepository;
import org.springframework.stereotype.Service;
@Service
diff --git a/src/test/java/com/lanyuanxiaoyao/service/template/service/ReportService.java b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/ReportService.java
similarity index 51%
rename from src/test/java/com/lanyuanxiaoyao/service/template/service/ReportService.java
rename to spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/ReportService.java
index 7b59387..ceddc04 100644
--- a/src/test/java/com/lanyuanxiaoyao/service/template/service/ReportService.java
+++ b/spring-boot-service-template-jpa/src/test/java/com/lanyuanxiaoyao/service/template/jpa/service/ReportService.java
@@ -1,7 +1,7 @@
-package com.lanyuanxiaoyao.service.template.service;
+package com.lanyuanxiaoyao.service.template.jpa.service;
-import com.lanyuanxiaoyao.service.template.entity.Report;
-import com.lanyuanxiaoyao.service.template.repository.ReportRepository;
+import com.lanyuanxiaoyao.service.template.jpa.entity.Report;
+import com.lanyuanxiaoyao.service.template.jpa.repository.ReportRepository;
import org.springframework.stereotype.Service;
@Service
diff --git a/src/test/resources/application.yml b/spring-boot-service-template-jpa/src/test/resources/application.yml
similarity index 100%
rename from src/test/resources/application.yml
rename to spring-boot-service-template-jpa/src/test/resources/application.yml
diff --git a/spring-boot-service-template-task/pom.xml b/spring-boot-service-template-task/pom.xml
new file mode 100644
index 0000000..535e4bf
--- /dev/null
+++ b/spring-boot-service-template-task/pom.xml
@@ -0,0 +1,19 @@
+
+
+ 4.0.0
+
+ com.lanyuanxiaoyao
+ spring-boot-service-template
+ 1.1.0-SNAPSHOT
+
+
+ spring-boot-service-template-task
+
+
+
+
+
+
+
\ No newline at end of file