From 86c33d152d4fca29075e3bfad25b7f9fac65c6c2 Mon Sep 17 00:00:00 2001 From: yulichang <570810310@qq.com> Date: Tue, 8 Nov 2022 20:05:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=8C=96=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mybatis-plus-join-annotation/pom.xml | 41 ++++++++++ .../yulichang/annotation/EntityMapping.java | 1 + .../yulichang/annotation/FieldMapping.java | 1 + .../yulichang/annotation/MPJMappingApply.java | 1 + .../annotation/MPJMappingCondition.java | 1 + mybatis-plus-join-boot-starter/pom.xml | 49 +++++++++++ .../MybatisPlusJoinAutoConfiguration.java | 82 +++++++++++++++++++ .../MybatisPlusJoinProperties.java | 19 +++++ .../main/resources/META-INF/spring.factories | 2 + mybatis-plus-join-core/pom.xml | 49 +++++++++++ .../core/metadata/MPJTableInfoHelper.java | 0 .../github/yulichang/base/MPJBaseMapper.java | 0 .../github/yulichang/base/MPJBaseService.java | 0 .../yulichang/base/MPJBaseServiceImpl.java | 0 .../yulichang/base/mapper/MPJDeepMapper.java | 0 .../yulichang/base/mapper/MPJJoinMapper.java | 0 .../base/mapper/wrapper/MappingQuery.java | 0 .../base/service/MPJDeepService.java | 0 .../base/service/MPJJoinService.java | 0 .../yulichang/config/InterceptorConfig.java | 8 +- .../yulichang/config/MappingConfig.java | 6 +- .../yulichang/exception/MPJException.java | 0 .../yulichang/injector/MPJSqlInjector.java | 27 ++---- .../yulichang/interceptor/MPJInterceptor.java | 4 +- .../yulichang/interfaces/MPJBaseJoin.java | 0 .../yulichang/mapper/MPJMappingWrapper.java | 0 .../yulichang/mapper/MPJTableFieldInfo.java | 0 .../github/yulichang/mapper/MPJTableInfo.java | 0 .../mapper/MPJTableMapperHelper.java | 0 .../yulichang/method/MPJAbstractMethod.java | 0 .../yulichang/method/MPJBaseMethod.java | 0 .../yulichang/method/MPJResultType.java | 0 .../yulichang/method/SelectJoinCount.java | 0 .../yulichang/method/SelectJoinList.java | 0 .../yulichang/method/SelectJoinMap.java | 0 .../yulichang/method/SelectJoinMaps.java | 0 .../yulichang/method/SelectJoinMapsPage.java | 0 .../yulichang/method/SelectJoinOne.java | 0 .../yulichang/method/SelectJoinPage.java | 0 .../github/yulichang/method/SqlMethod.java | 0 .../yulichang/method/mp/SelectCount.java | 0 .../yulichang/method/mp/SelectList.java | 0 .../yulichang/method/mp/SelectMaps.java | 0 .../yulichang/method/mp/SelectMapsPage.java | 0 .../yulichang/method/mp/SelectObjs.java | 0 .../github/yulichang/method/mp/SelectOne.java | 0 .../yulichang/method/mp/SelectPage.java | 0 .../yulichang/method/mp/TableAlias.java | 0 .../query/MPJLambdaQueryWrapper.java | 0 .../yulichang/query/MPJQueryWrapper.java | 0 .../yulichang/query/interfaces/MPJJoin.java | 0 .../github/yulichang/toolkit/Constant.java | 0 .../yulichang/toolkit/InterceptorList.java | 0 .../github/yulichang/toolkit/LambdaUtils.java | 0 .../github/yulichang/toolkit/MPJWrappers.java | 0 .../yulichang/toolkit/ReflectionKit.java | 0 .../yulichang/toolkit/SpringContentUtils.java | 0 .../yulichang/toolkit/sql/SqlScriptUtils.java | 0 .../toolkit/support/ColumnCache.java | 0 .../toolkit/support/SelectColumn.java | 0 .../toolkit/support/SerializedLambda.java | 0 .../wrapper/MPJAbstractLambdaWrapper.java | 0 .../yulichang/wrapper/MPJAbstractWrapper.java | 0 .../yulichang/wrapper/MPJLambdaWrapper.java | 0 .../yulichang/wrapper/enums/BaseFuncEnum.java | 0 .../wrapper/enums/DefaultFuncEnum.java | 0 .../yulichang/wrapper/interfaces/Compare.java | 0 .../yulichang/wrapper/interfaces/Func.java | 0 .../yulichang/wrapper/interfaces/Join.java | 0 .../wrapper/interfaces/LambdaJoin.java | 0 .../yulichang/wrapper/interfaces/Query.java | 0 .../wrapper/interfaces/on/OnCompare.java | 0 .../wrapper/interfaces/on/OnFunction.java | 0 .../wrapper/resultmap/LabelType.java | 0 .../yulichang/wrapper/resultmap/MFunc.java | 0 .../wrapper/resultmap/MybatisLabel.java | 0 .../yulichang/wrapper/resultmap/Result.java | 0 mybatis-plus-join-test/pom.xml | 41 ++++++++++ .../main/java/com/github/yulichang/Main.java | 7 ++ pom.xml | 14 +++- src/main/resources/META-INF/spring.factories | 6 -- 81 files changed, 321 insertions(+), 38 deletions(-) create mode 100644 mybatis-plus-join-annotation/pom.xml rename {src => mybatis-plus-join-annotation/src}/main/java/com/github/yulichang/annotation/EntityMapping.java (99%) rename {src => mybatis-plus-join-annotation/src}/main/java/com/github/yulichang/annotation/FieldMapping.java (98%) rename {src => mybatis-plus-join-annotation/src}/main/java/com/github/yulichang/annotation/MPJMappingApply.java (92%) rename {src => mybatis-plus-join-annotation/src}/main/java/com/github/yulichang/annotation/MPJMappingCondition.java (95%) create mode 100644 mybatis-plus-join-boot-starter/pom.xml create mode 100644 mybatis-plus-join-boot-starter/src/main/java/com/github/yulichang/autoconfigure/MybatisPlusJoinAutoConfiguration.java create mode 100644 mybatis-plus-join-boot-starter/src/main/java/com/github/yulichang/autoconfigure/MybatisPlusJoinProperties.java create mode 100644 mybatis-plus-join-boot-starter/src/main/resources/META-INF/spring.factories create mode 100644 mybatis-plus-join-core/pom.xml rename {src => mybatis-plus-join-core/src}/main/java/com/baomidou/mybatisplus/core/metadata/MPJTableInfoHelper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/base/MPJBaseMapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/base/MPJBaseService.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/base/MPJBaseServiceImpl.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/base/mapper/MPJDeepMapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/base/mapper/MPJJoinMapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/base/mapper/wrapper/MappingQuery.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/base/service/MPJDeepService.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/base/service/MPJJoinService.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/config/InterceptorConfig.java (90%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/config/MappingConfig.java (86%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/exception/MPJException.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/injector/MPJSqlInjector.java (82%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/interceptor/MPJInterceptor.java (98%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/interfaces/MPJBaseJoin.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/mapper/MPJMappingWrapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/mapper/MPJTableFieldInfo.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/mapper/MPJTableInfo.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/mapper/MPJTableMapperHelper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/MPJAbstractMethod.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/MPJBaseMethod.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/MPJResultType.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/SelectJoinCount.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/SelectJoinList.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/SelectJoinMap.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/SelectJoinMaps.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/SelectJoinMapsPage.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/SelectJoinOne.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/SelectJoinPage.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/SqlMethod.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/mp/SelectCount.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/mp/SelectList.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/mp/SelectMaps.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/mp/SelectMapsPage.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/mp/SelectObjs.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/mp/SelectOne.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/mp/SelectPage.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/method/mp/TableAlias.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/query/MPJLambdaQueryWrapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/query/MPJQueryWrapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/query/interfaces/MPJJoin.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/Constant.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/InterceptorList.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/LambdaUtils.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/MPJWrappers.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/ReflectionKit.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/SpringContentUtils.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/sql/SqlScriptUtils.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/support/ColumnCache.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/support/SelectColumn.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/toolkit/support/SerializedLambda.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/MPJAbstractLambdaWrapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/MPJAbstractWrapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/MPJLambdaWrapper.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/enums/BaseFuncEnum.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/enums/DefaultFuncEnum.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/interfaces/Compare.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/interfaces/Func.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/interfaces/Join.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/interfaces/LambdaJoin.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/interfaces/Query.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/interfaces/on/OnCompare.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/interfaces/on/OnFunction.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/resultmap/LabelType.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/resultmap/MFunc.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/resultmap/MybatisLabel.java (100%) rename {src => mybatis-plus-join-core/src}/main/java/com/github/yulichang/wrapper/resultmap/Result.java (100%) create mode 100644 mybatis-plus-join-test/pom.xml create mode 100644 mybatis-plus-join-test/src/main/java/com/github/yulichang/Main.java delete mode 100644 src/main/resources/META-INF/spring.factories diff --git a/mybatis-plus-join-annotation/pom.xml b/mybatis-plus-join-annotation/pom.xml new file mode 100644 index 0000000..fe7ac02 --- /dev/null +++ b/mybatis-plus-join-annotation/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + com.github.yulichang + mybatis-plus-join-root + 1.3.0 + + mybatis-plus-join-annotation + mybatis-plus-join-annotation + + An enhanced toolkit of Mybatis-Plus to simplify development. + https://github.com/yulichang/mybatis-plus-join + + + The Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + mybatis-plus-join + yulichang + yu_lichang@qq.com + + + + scm:git:https://github.com/yulichang/mybatis-plus-join.git + scm:git:https://github.com/yulichang/mybatis-plus-join.git + https://github.com/yulichang/mybatis-plus-join + + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/src/main/java/com/github/yulichang/annotation/EntityMapping.java b/mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/EntityMapping.java similarity index 99% rename from src/main/java/com/github/yulichang/annotation/EntityMapping.java rename to mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/EntityMapping.java index 5d6ffdd..847cee2 100644 --- a/src/main/java/com/github/yulichang/annotation/EntityMapping.java +++ b/mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/EntityMapping.java @@ -10,6 +10,7 @@ import java.lang.annotation.*; * @since 1.2.0 */ @Documented +@SuppressWarnings("unused") @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE}) public @interface EntityMapping { diff --git a/src/main/java/com/github/yulichang/annotation/FieldMapping.java b/mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/FieldMapping.java similarity index 98% rename from src/main/java/com/github/yulichang/annotation/FieldMapping.java rename to mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/FieldMapping.java index a61c7db..5f310a0 100644 --- a/src/main/java/com/github/yulichang/annotation/FieldMapping.java +++ b/mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/FieldMapping.java @@ -10,6 +10,7 @@ import java.lang.annotation.*; * @since 1.2.0 */ @Documented +@SuppressWarnings("unused") @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE}) public @interface FieldMapping { diff --git a/src/main/java/com/github/yulichang/annotation/MPJMappingApply.java b/mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/MPJMappingApply.java similarity index 92% rename from src/main/java/com/github/yulichang/annotation/MPJMappingApply.java rename to mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/MPJMappingApply.java index 8784957..ded2e61 100644 --- a/src/main/java/com/github/yulichang/annotation/MPJMappingApply.java +++ b/mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/MPJMappingApply.java @@ -7,6 +7,7 @@ package com.github.yulichang.annotation; * @author yulichang * @since 1.2.0 */ +@SuppressWarnings("unused") public @interface MPJMappingApply { /** diff --git a/src/main/java/com/github/yulichang/annotation/MPJMappingCondition.java b/mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/MPJMappingCondition.java similarity index 95% rename from src/main/java/com/github/yulichang/annotation/MPJMappingCondition.java rename to mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/MPJMappingCondition.java index da024a5..8c09726 100644 --- a/src/main/java/com/github/yulichang/annotation/MPJMappingCondition.java +++ b/mybatis-plus-join-annotation/src/main/java/com/github/yulichang/annotation/MPJMappingCondition.java @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.enums.SqlKeyword; * @author yulichang * @since 1.2.0 */ +@SuppressWarnings("unused") public @interface MPJMappingCondition { /** diff --git a/mybatis-plus-join-boot-starter/pom.xml b/mybatis-plus-join-boot-starter/pom.xml new file mode 100644 index 0000000..50c222f --- /dev/null +++ b/mybatis-plus-join-boot-starter/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + com.github.yulichang + mybatis-plus-join-root + 1.3.0 + + mybatis-plus-join-boot-starter + mybatis-plus-join-boot-starter + + An enhanced toolkit of Mybatis-Plus to simplify development. + https://github.com/yulichang/mybatis-plus-join + + + The Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + mybatis-plus-join + yulichang + yu_lichang@qq.com + + + + scm:git:https://github.com/yulichang/mybatis-plus-join.git + scm:git:https://github.com/yulichang/mybatis-plus-join.git + https://github.com/yulichang/mybatis-plus-join + + + + 8 + 8 + UTF-8 + + + + + com.github.yulichang + mybatis-plus-join-core + 1.3.0 + + + + \ No newline at end of file diff --git a/mybatis-plus-join-boot-starter/src/main/java/com/github/yulichang/autoconfigure/MybatisPlusJoinAutoConfiguration.java b/mybatis-plus-join-boot-starter/src/main/java/com/github/yulichang/autoconfigure/MybatisPlusJoinAutoConfiguration.java new file mode 100644 index 0000000..08f3a60 --- /dev/null +++ b/mybatis-plus-join-boot-starter/src/main/java/com/github/yulichang/autoconfigure/MybatisPlusJoinAutoConfiguration.java @@ -0,0 +1,82 @@ +package com.github.yulichang.autoconfigure; + +import com.baomidou.mybatisplus.autoconfigure.MybatisPlusLanguageDriverAutoConfiguration; +import com.baomidou.mybatisplus.core.injector.AbstractSqlInjector; +import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector; +import com.baomidou.mybatisplus.core.injector.ISqlInjector; +import com.github.yulichang.config.InterceptorConfig; +import com.github.yulichang.config.MappingConfig; +import com.github.yulichang.injector.MPJSqlInjector; +import com.github.yulichang.interceptor.MPJInterceptor; +import com.github.yulichang.toolkit.SpringContentUtils; +import org.apache.ibatis.session.SqlSessionFactory; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.Ordered; +import org.springframework.core.annotation.Order; + +import javax.sql.DataSource; +import java.util.List; + +@SuppressWarnings("unused") +@Configuration(proxyBeanMethods = false) +@ConditionalOnClass({SqlSessionFactory.class, SqlSessionFactoryBean.class}) +@ConditionalOnSingleCandidate(DataSource.class) +@EnableConfigurationProperties(MybatisPlusJoinProperties.class) +@AutoConfigureAfter({DataSourceAutoConfiguration.class, MybatisPlusLanguageDriverAutoConfiguration.class}) +public class MybatisPlusJoinAutoConfiguration { + + private static final Logger logger = LoggerFactory.getLogger(MybatisPlusJoinAutoConfiguration.class); + + + @SuppressWarnings("FieldCanBeLocal") + private final MybatisPlusJoinProperties properties; + + + public MybatisPlusJoinAutoConfiguration(MybatisPlusJoinProperties properties) { + this.properties = properties; + } + + @Bean + @Order(Ordered.HIGHEST_PRECEDENCE) + public MPJInterceptor mpjInterceptor() { + return new MPJInterceptor(); + } + + + @Bean + @ConditionalOnBean(SqlSessionFactory.class) + public InterceptorConfig interceptorConfig(List sqlSessionFactoryList) { + return new InterceptorConfig(sqlSessionFactoryList); + } + + @Bean + @Order(Ordered.HIGHEST_PRECEDENCE) + @ConditionalOnMissingBean({DefaultSqlInjector.class, AbstractSqlInjector.class, ISqlInjector.class}) + public MPJSqlInjector mpjSqlInjector() { + return new MPJSqlInjector(); + } + + @Bean + @Order(Ordered.HIGHEST_PRECEDENCE) + public MappingConfig mappingConfig() { + return new MappingConfig(); + } + + @Bean + @Order(Ordered.HIGHEST_PRECEDENCE) + public SpringContentUtils springContentUtils() { + return new SpringContentUtils(); + } + +} diff --git a/mybatis-plus-join-boot-starter/src/main/java/com/github/yulichang/autoconfigure/MybatisPlusJoinProperties.java b/mybatis-plus-join-boot-starter/src/main/java/com/github/yulichang/autoconfigure/MybatisPlusJoinProperties.java new file mode 100644 index 0000000..97df694 --- /dev/null +++ b/mybatis-plus-join-boot-starter/src/main/java/com/github/yulichang/autoconfigure/MybatisPlusJoinProperties.java @@ -0,0 +1,19 @@ +package com.github.yulichang.autoconfigure; + +import lombok.Data; +import lombok.experimental.Accessors; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Configuration properties for MyBatis. + * + * @author Eddú Meléndez + * @author Kazuki Shimizu + */ +@Data +@Accessors(chain = true) +@ConfigurationProperties(prefix = "mybatis-plus-join") +public class MybatisPlusJoinProperties { + + private Boolean banner = false; +} diff --git a/mybatis-plus-join-boot-starter/src/main/resources/META-INF/spring.factories b/mybatis-plus-join-boot-starter/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..f08fa4e --- /dev/null +++ b/mybatis-plus-join-boot-starter/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.github.yulichang.autoconfigure.MybatisPlusJoinAutoConfiguration diff --git a/mybatis-plus-join-core/pom.xml b/mybatis-plus-join-core/pom.xml new file mode 100644 index 0000000..cc6a216 --- /dev/null +++ b/mybatis-plus-join-core/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + com.github.yulichang + mybatis-plus-join-root + 1.3.0 + + mybatis-plus-join-core + mybatis-plus-join-core + + An enhanced toolkit of Mybatis-Plus to simplify development. + https://github.com/yulichang/mybatis-plus-join + + + The Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + mybatis-plus-join + yulichang + yu_lichang@qq.com + + + + scm:git:https://github.com/yulichang/mybatis-plus-join.git + scm:git:https://github.com/yulichang/mybatis-plus-join.git + https://github.com/yulichang/mybatis-plus-join + + + + + 8 + 8 + UTF-8 + + + + + com.github.yulichang + mybatis-plus-join-annotation + 1.3.0 + + + \ No newline at end of file diff --git a/src/main/java/com/baomidou/mybatisplus/core/metadata/MPJTableInfoHelper.java b/mybatis-plus-join-core/src/main/java/com/baomidou/mybatisplus/core/metadata/MPJTableInfoHelper.java similarity index 100% rename from src/main/java/com/baomidou/mybatisplus/core/metadata/MPJTableInfoHelper.java rename to mybatis-plus-join-core/src/main/java/com/baomidou/mybatisplus/core/metadata/MPJTableInfoHelper.java diff --git a/src/main/java/com/github/yulichang/base/MPJBaseMapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/base/MPJBaseMapper.java similarity index 100% rename from src/main/java/com/github/yulichang/base/MPJBaseMapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/base/MPJBaseMapper.java diff --git a/src/main/java/com/github/yulichang/base/MPJBaseService.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/base/MPJBaseService.java similarity index 100% rename from src/main/java/com/github/yulichang/base/MPJBaseService.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/base/MPJBaseService.java diff --git a/src/main/java/com/github/yulichang/base/MPJBaseServiceImpl.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/base/MPJBaseServiceImpl.java similarity index 100% rename from src/main/java/com/github/yulichang/base/MPJBaseServiceImpl.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/base/MPJBaseServiceImpl.java diff --git a/src/main/java/com/github/yulichang/base/mapper/MPJDeepMapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/base/mapper/MPJDeepMapper.java similarity index 100% rename from src/main/java/com/github/yulichang/base/mapper/MPJDeepMapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/base/mapper/MPJDeepMapper.java diff --git a/src/main/java/com/github/yulichang/base/mapper/MPJJoinMapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/base/mapper/MPJJoinMapper.java similarity index 100% rename from src/main/java/com/github/yulichang/base/mapper/MPJJoinMapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/base/mapper/MPJJoinMapper.java diff --git a/src/main/java/com/github/yulichang/base/mapper/wrapper/MappingQuery.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/base/mapper/wrapper/MappingQuery.java similarity index 100% rename from src/main/java/com/github/yulichang/base/mapper/wrapper/MappingQuery.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/base/mapper/wrapper/MappingQuery.java diff --git a/src/main/java/com/github/yulichang/base/service/MPJDeepService.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/base/service/MPJDeepService.java similarity index 100% rename from src/main/java/com/github/yulichang/base/service/MPJDeepService.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/base/service/MPJDeepService.java diff --git a/src/main/java/com/github/yulichang/base/service/MPJJoinService.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/base/service/MPJJoinService.java similarity index 100% rename from src/main/java/com/github/yulichang/base/service/MPJJoinService.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/base/service/MPJJoinService.java diff --git a/src/main/java/com/github/yulichang/config/InterceptorConfig.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/config/InterceptorConfig.java similarity index 90% rename from src/main/java/com/github/yulichang/config/InterceptorConfig.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/config/InterceptorConfig.java index 7d0292b..2b632df 100644 --- a/src/main/java/com/github/yulichang/config/InterceptorConfig.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/config/InterceptorConfig.java @@ -8,8 +8,6 @@ import org.apache.ibatis.logging.LogFactory; import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.plugin.InterceptorChain; import org.apache.ibatis.session.SqlSessionFactory; -import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; -import org.springframework.context.annotation.Configuration; import java.lang.reflect.Field; import java.util.List; @@ -19,9 +17,9 @@ import java.util.List; * * @author yulichang */ -@Configuration -@ConditionalOnBean(SqlSessionFactory.class) -@SuppressWarnings("unused") +//@Configuration +//@ConditionalOnBean(SqlSessionFactory.class) +//@SuppressWarnings("unused") public class InterceptorConfig { diff --git a/src/main/java/com/github/yulichang/config/MappingConfig.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/config/MappingConfig.java similarity index 86% rename from src/main/java/com/github/yulichang/config/MappingConfig.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/config/MappingConfig.java index ee07913..ee742b5 100644 --- a/src/main/java/com/github/yulichang/config/MappingConfig.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/config/MappingConfig.java @@ -1,12 +1,10 @@ package com.github.yulichang.config; import com.baomidou.mybatisplus.core.metadata.MPJTableInfoHelper; -import com.github.yulichang.mapper.MPJTableMapperHelper; import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; +import com.github.yulichang.mapper.MPJTableMapperHelper; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; -import org.springframework.core.Ordered; -import org.springframework.core.annotation.Order; /** * 关系映射配置 @@ -14,7 +12,7 @@ import org.springframework.core.annotation.Order; * @author yulichang * @since 1.2.0 */ -@Order(Ordered.HIGHEST_PRECEDENCE) +//@Order(Ordered.HIGHEST_PRECEDENCE) public class MappingConfig implements ApplicationListener { @Override diff --git a/src/main/java/com/github/yulichang/exception/MPJException.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/exception/MPJException.java similarity index 100% rename from src/main/java/com/github/yulichang/exception/MPJException.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/exception/MPJException.java diff --git a/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java similarity index 82% rename from src/main/java/com/github/yulichang/injector/MPJSqlInjector.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java index e0ac705..4850462 100644 --- a/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/injector/MPJSqlInjector.java @@ -2,27 +2,16 @@ package com.github.yulichang.injector; import com.baomidou.mybatisplus.core.MybatisPlusVersion; import com.baomidou.mybatisplus.core.injector.AbstractMethod; -import com.baomidou.mybatisplus.core.injector.AbstractSqlInjector; import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector; -import com.baomidou.mybatisplus.core.injector.ISqlInjector; import com.baomidou.mybatisplus.core.injector.methods.*; import com.baomidou.mybatisplus.core.mapper.Mapper; import com.baomidou.mybatisplus.core.metadata.TableInfo; import com.baomidou.mybatisplus.core.toolkit.ClassUtils; import com.github.yulichang.mapper.MPJTableMapperHelper; import com.github.yulichang.method.*; -import com.github.yulichang.method.mp.SelectCount; -import com.github.yulichang.method.mp.SelectList; -import com.github.yulichang.method.mp.SelectMaps; -import com.github.yulichang.method.mp.SelectMapsPage; -import com.github.yulichang.method.mp.SelectObjs; import com.github.yulichang.method.mp.SelectOne; -import com.github.yulichang.method.mp.SelectPage; import org.apache.ibatis.builder.MapperBuilderAssistant; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.core.GenericTypeResolver; -import org.springframework.core.Ordered; -import org.springframework.core.annotation.Order; import java.util.ArrayList; import java.util.Arrays; @@ -37,8 +26,8 @@ import static java.util.stream.Collectors.toList; * @author yulichang * @see DefaultSqlInjector */ -@Order(Ordered.HIGHEST_PRECEDENCE) -@ConditionalOnMissingBean({DefaultSqlInjector.class, AbstractSqlInjector.class, ISqlInjector.class}) +//@Order(Ordered.HIGHEST_PRECEDENCE) +//@ConditionalOnMissingBean({DefaultSqlInjector.class, AbstractSqlInjector.class, ISqlInjector.class}) public class MPJSqlInjector extends DefaultSqlInjector { private static final List METHOD_LIST = Arrays.asList("SelectOne", "SelectCount", @@ -109,12 +98,12 @@ public class MPJSqlInjector extends DefaultSqlInjector { private List getSelectMethod() { List list = new ArrayList<>(); list.add(new SelectOne()); - list.add(new SelectCount()); - list.add(new SelectMaps()); - list.add(new SelectMapsPage()); - list.add(new SelectObjs()); - list.add(new SelectList()); - list.add(new SelectPage()); + list.add(new com.github.yulichang.method.mp.SelectCount()); + list.add(new com.github.yulichang.method.mp.SelectMaps()); + list.add(new com.github.yulichang.method.mp.SelectMapsPage()); + list.add(new com.github.yulichang.method.mp.SelectObjs()); + list.add(new com.github.yulichang.method.mp.SelectList()); + list.add(new com.github.yulichang.method.mp.SelectPage()); return list; } diff --git a/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java similarity index 98% rename from src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java index 7184c9f..d2f5363 100644 --- a/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/interceptor/MPJInterceptor.java @@ -150,13 +150,13 @@ public class MPJInterceptor implements Interceptor { TableInfo tableInfo = TableInfoHelper.getTableInfo(resultType); String id = ms.getId() + StringPool.DOT + Constants.MYBATIS_PLUS + StringPool.UNDERSCORE + resultType.getName(); if (!(obj instanceof MPJLambdaWrapper) || Map.class.isAssignableFrom(resultType) || - ReflectionKit.isPrimitiveOrWrapper(resultType) || + com.github.yulichang.toolkit.ReflectionKit.isPrimitiveOrWrapper(resultType) || Collection.class.isAssignableFrom(resultType)) { result.add(getDefaultResultMap(tableInfo, ms, resultType, id)); return result; } MPJLambdaWrapper wrapper = (MPJLambdaWrapper) obj; - Map fieldMap = ReflectionKit.getFieldMap(resultType); + Map fieldMap = com.github.yulichang.toolkit.ReflectionKit.getFieldMap(resultType); List columnList = wrapper.getSelectColumns(); //移除对多查询列,为了可重复使用wrapper columnList.removeIf(SelectColumn::isLabel); diff --git a/src/main/java/com/github/yulichang/interfaces/MPJBaseJoin.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/interfaces/MPJBaseJoin.java similarity index 100% rename from src/main/java/com/github/yulichang/interfaces/MPJBaseJoin.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/interfaces/MPJBaseJoin.java diff --git a/src/main/java/com/github/yulichang/mapper/MPJMappingWrapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/mapper/MPJMappingWrapper.java similarity index 100% rename from src/main/java/com/github/yulichang/mapper/MPJMappingWrapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/mapper/MPJMappingWrapper.java diff --git a/src/main/java/com/github/yulichang/mapper/MPJTableFieldInfo.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/mapper/MPJTableFieldInfo.java similarity index 100% rename from src/main/java/com/github/yulichang/mapper/MPJTableFieldInfo.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/mapper/MPJTableFieldInfo.java diff --git a/src/main/java/com/github/yulichang/mapper/MPJTableInfo.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/mapper/MPJTableInfo.java similarity index 100% rename from src/main/java/com/github/yulichang/mapper/MPJTableInfo.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/mapper/MPJTableInfo.java diff --git a/src/main/java/com/github/yulichang/mapper/MPJTableMapperHelper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/mapper/MPJTableMapperHelper.java similarity index 100% rename from src/main/java/com/github/yulichang/mapper/MPJTableMapperHelper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/mapper/MPJTableMapperHelper.java diff --git a/src/main/java/com/github/yulichang/method/MPJAbstractMethod.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJAbstractMethod.java similarity index 100% rename from src/main/java/com/github/yulichang/method/MPJAbstractMethod.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJAbstractMethod.java diff --git a/src/main/java/com/github/yulichang/method/MPJBaseMethod.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJBaseMethod.java similarity index 100% rename from src/main/java/com/github/yulichang/method/MPJBaseMethod.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJBaseMethod.java diff --git a/src/main/java/com/github/yulichang/method/MPJResultType.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJResultType.java similarity index 100% rename from src/main/java/com/github/yulichang/method/MPJResultType.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/MPJResultType.java diff --git a/src/main/java/com/github/yulichang/method/SelectJoinCount.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinCount.java similarity index 100% rename from src/main/java/com/github/yulichang/method/SelectJoinCount.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinCount.java diff --git a/src/main/java/com/github/yulichang/method/SelectJoinList.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinList.java similarity index 100% rename from src/main/java/com/github/yulichang/method/SelectJoinList.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinList.java diff --git a/src/main/java/com/github/yulichang/method/SelectJoinMap.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinMap.java similarity index 100% rename from src/main/java/com/github/yulichang/method/SelectJoinMap.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinMap.java diff --git a/src/main/java/com/github/yulichang/method/SelectJoinMaps.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinMaps.java similarity index 100% rename from src/main/java/com/github/yulichang/method/SelectJoinMaps.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinMaps.java diff --git a/src/main/java/com/github/yulichang/method/SelectJoinMapsPage.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinMapsPage.java similarity index 100% rename from src/main/java/com/github/yulichang/method/SelectJoinMapsPage.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinMapsPage.java diff --git a/src/main/java/com/github/yulichang/method/SelectJoinOne.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinOne.java similarity index 100% rename from src/main/java/com/github/yulichang/method/SelectJoinOne.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinOne.java diff --git a/src/main/java/com/github/yulichang/method/SelectJoinPage.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinPage.java similarity index 100% rename from src/main/java/com/github/yulichang/method/SelectJoinPage.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SelectJoinPage.java diff --git a/src/main/java/com/github/yulichang/method/SqlMethod.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SqlMethod.java similarity index 100% rename from src/main/java/com/github/yulichang/method/SqlMethod.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/SqlMethod.java diff --git a/src/main/java/com/github/yulichang/method/mp/SelectCount.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectCount.java similarity index 100% rename from src/main/java/com/github/yulichang/method/mp/SelectCount.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectCount.java diff --git a/src/main/java/com/github/yulichang/method/mp/SelectList.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectList.java similarity index 100% rename from src/main/java/com/github/yulichang/method/mp/SelectList.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectList.java diff --git a/src/main/java/com/github/yulichang/method/mp/SelectMaps.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectMaps.java similarity index 100% rename from src/main/java/com/github/yulichang/method/mp/SelectMaps.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectMaps.java diff --git a/src/main/java/com/github/yulichang/method/mp/SelectMapsPage.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectMapsPage.java similarity index 100% rename from src/main/java/com/github/yulichang/method/mp/SelectMapsPage.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectMapsPage.java diff --git a/src/main/java/com/github/yulichang/method/mp/SelectObjs.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectObjs.java similarity index 100% rename from src/main/java/com/github/yulichang/method/mp/SelectObjs.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectObjs.java diff --git a/src/main/java/com/github/yulichang/method/mp/SelectOne.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectOne.java similarity index 100% rename from src/main/java/com/github/yulichang/method/mp/SelectOne.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectOne.java diff --git a/src/main/java/com/github/yulichang/method/mp/SelectPage.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectPage.java similarity index 100% rename from src/main/java/com/github/yulichang/method/mp/SelectPage.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/SelectPage.java diff --git a/src/main/java/com/github/yulichang/method/mp/TableAlias.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/TableAlias.java similarity index 100% rename from src/main/java/com/github/yulichang/method/mp/TableAlias.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/method/mp/TableAlias.java diff --git a/src/main/java/com/github/yulichang/query/MPJLambdaQueryWrapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/query/MPJLambdaQueryWrapper.java similarity index 100% rename from src/main/java/com/github/yulichang/query/MPJLambdaQueryWrapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/query/MPJLambdaQueryWrapper.java diff --git a/src/main/java/com/github/yulichang/query/MPJQueryWrapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/query/MPJQueryWrapper.java similarity index 100% rename from src/main/java/com/github/yulichang/query/MPJQueryWrapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/query/MPJQueryWrapper.java diff --git a/src/main/java/com/github/yulichang/query/interfaces/MPJJoin.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/query/interfaces/MPJJoin.java similarity index 100% rename from src/main/java/com/github/yulichang/query/interfaces/MPJJoin.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/query/interfaces/MPJJoin.java diff --git a/src/main/java/com/github/yulichang/toolkit/Constant.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/Constant.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/Constant.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/Constant.java diff --git a/src/main/java/com/github/yulichang/toolkit/InterceptorList.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/InterceptorList.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/InterceptorList.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/InterceptorList.java diff --git a/src/main/java/com/github/yulichang/toolkit/LambdaUtils.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/LambdaUtils.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/LambdaUtils.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/LambdaUtils.java diff --git a/src/main/java/com/github/yulichang/toolkit/MPJWrappers.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/MPJWrappers.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/MPJWrappers.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/MPJWrappers.java diff --git a/src/main/java/com/github/yulichang/toolkit/ReflectionKit.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/ReflectionKit.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/ReflectionKit.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/ReflectionKit.java diff --git a/src/main/java/com/github/yulichang/toolkit/SpringContentUtils.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/SpringContentUtils.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/SpringContentUtils.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/SpringContentUtils.java diff --git a/src/main/java/com/github/yulichang/toolkit/sql/SqlScriptUtils.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/sql/SqlScriptUtils.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/sql/SqlScriptUtils.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/sql/SqlScriptUtils.java diff --git a/src/main/java/com/github/yulichang/toolkit/support/ColumnCache.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/ColumnCache.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/support/ColumnCache.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/ColumnCache.java diff --git a/src/main/java/com/github/yulichang/toolkit/support/SelectColumn.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/SelectColumn.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/support/SelectColumn.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/SelectColumn.java diff --git a/src/main/java/com/github/yulichang/toolkit/support/SerializedLambda.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/SerializedLambda.java similarity index 100% rename from src/main/java/com/github/yulichang/toolkit/support/SerializedLambda.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/support/SerializedLambda.java diff --git a/src/main/java/com/github/yulichang/wrapper/MPJAbstractLambdaWrapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/MPJAbstractLambdaWrapper.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/MPJAbstractLambdaWrapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/MPJAbstractLambdaWrapper.java diff --git a/src/main/java/com/github/yulichang/wrapper/MPJAbstractWrapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/MPJAbstractWrapper.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/MPJAbstractWrapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/MPJAbstractWrapper.java diff --git a/src/main/java/com/github/yulichang/wrapper/MPJLambdaWrapper.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/MPJLambdaWrapper.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/MPJLambdaWrapper.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/MPJLambdaWrapper.java diff --git a/src/main/java/com/github/yulichang/wrapper/enums/BaseFuncEnum.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/enums/BaseFuncEnum.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/enums/BaseFuncEnum.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/enums/BaseFuncEnum.java diff --git a/src/main/java/com/github/yulichang/wrapper/enums/DefaultFuncEnum.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/enums/DefaultFuncEnum.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/enums/DefaultFuncEnum.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/enums/DefaultFuncEnum.java diff --git a/src/main/java/com/github/yulichang/wrapper/interfaces/Compare.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/Compare.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/interfaces/Compare.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/Compare.java diff --git a/src/main/java/com/github/yulichang/wrapper/interfaces/Func.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/Func.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/interfaces/Func.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/Func.java diff --git a/src/main/java/com/github/yulichang/wrapper/interfaces/Join.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/Join.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/interfaces/Join.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/Join.java diff --git a/src/main/java/com/github/yulichang/wrapper/interfaces/LambdaJoin.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/LambdaJoin.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/interfaces/LambdaJoin.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/LambdaJoin.java diff --git a/src/main/java/com/github/yulichang/wrapper/interfaces/Query.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/Query.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/interfaces/Query.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/Query.java diff --git a/src/main/java/com/github/yulichang/wrapper/interfaces/on/OnCompare.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/on/OnCompare.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/interfaces/on/OnCompare.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/on/OnCompare.java diff --git a/src/main/java/com/github/yulichang/wrapper/interfaces/on/OnFunction.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/on/OnFunction.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/interfaces/on/OnFunction.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/interfaces/on/OnFunction.java diff --git a/src/main/java/com/github/yulichang/wrapper/resultmap/LabelType.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/LabelType.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/resultmap/LabelType.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/LabelType.java diff --git a/src/main/java/com/github/yulichang/wrapper/resultmap/MFunc.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/MFunc.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/resultmap/MFunc.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/MFunc.java diff --git a/src/main/java/com/github/yulichang/wrapper/resultmap/MybatisLabel.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/MybatisLabel.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/resultmap/MybatisLabel.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/MybatisLabel.java diff --git a/src/main/java/com/github/yulichang/wrapper/resultmap/Result.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/Result.java similarity index 100% rename from src/main/java/com/github/yulichang/wrapper/resultmap/Result.java rename to mybatis-plus-join-core/src/main/java/com/github/yulichang/wrapper/resultmap/Result.java diff --git a/mybatis-plus-join-test/pom.xml b/mybatis-plus-join-test/pom.xml new file mode 100644 index 0000000..9eaf596 --- /dev/null +++ b/mybatis-plus-join-test/pom.xml @@ -0,0 +1,41 @@ + + + 4.0.0 + + com.github.yulichang + mybatis-plus-join-root + 1.3.0 + + mybatis-plus-join-test + mybatis-plus-join-test + + An enhanced toolkit of Mybatis-Plus to simplify development. + https://github.com/yulichang/mybatis-plus-join + + + The Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + mybatis-plus-join + yulichang + yu_lichang@qq.com + + + + scm:git:https://github.com/yulichang/mybatis-plus-join.git + scm:git:https://github.com/yulichang/mybatis-plus-join.git + https://github.com/yulichang/mybatis-plus-join + + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/mybatis-plus-join-test/src/main/java/com/github/yulichang/Main.java b/mybatis-plus-join-test/src/main/java/com/github/yulichang/Main.java new file mode 100644 index 0000000..a2a33f2 --- /dev/null +++ b/mybatis-plus-join-test/src/main/java/com/github/yulichang/Main.java @@ -0,0 +1,7 @@ +package com.github.yulichang; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index f434148..41cc966 100644 --- a/pom.xml +++ b/pom.xml @@ -3,9 +3,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.github.yulichang - mybatis-plus-join + mybatis-plus-join-root + pom 1.3.0 - mybatis-plus-join + mybatis-plus-join-root + An enhanced toolkit of Mybatis-Plus to simplify development. https://github.com/yulichang/mybatis-plus-join @@ -26,6 +28,14 @@ scm:git:https://github.com/yulichang/mybatis-plus-join.git https://github.com/yulichang/mybatis-plus-join + + + mybatis-plus-join-boot-starter + mybatis-plus-join-core + mybatis-plus-join-annotation + mybatis-plus-join-test + + UTF-8 github diff --git a/src/main/resources/META-INF/spring.factories b/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 327caa0..0000000 --- a/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,6 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.github.yulichang.interceptor.MPJInterceptor,\ - com.github.yulichang.injector.MPJSqlInjector,\ - com.github.yulichang.config.InterceptorConfig,\ - com.github.yulichang.config.MappingConfig,\ - com.github.yulichang.toolkit.SpringContentUtils