feat: 完成2.0版本发布,完美支持springboot3
This commit is contained in:
parent
1669aa5f7a
commit
58bdc3276b
@ -18,13 +18,13 @@ import static org.springframework.data.util.CastUtils.cast;
|
|||||||
*/
|
*/
|
||||||
public class AuditorCallback implements EntityCallback<Domain> {
|
public class AuditorCallback implements EntityCallback<Domain> {
|
||||||
|
|
||||||
@Setter(onMethod_ = @Autowired)
|
@Autowired
|
||||||
private ObjectProvider<BeanAuditor<Domain>> commonAuditors;
|
private ObjectProvider<BeanAuditor<Domain>> commonAuditors;
|
||||||
|
|
||||||
@Setter(onMethod_ = @Autowired)
|
@Autowired
|
||||||
private ObjectProvider<BeanAuditor<AuditDomain>> operationAuditors;
|
private ObjectProvider<BeanAuditor<AuditDomain>> operationAuditors;
|
||||||
|
|
||||||
@Setter(onMethod_ = @Autowired)
|
@Autowired
|
||||||
private ObjectProvider<BeanAuditor<AuthorizedDomain>> authorizeAuditors;
|
private ObjectProvider<BeanAuditor<AuthorizedDomain>> authorizeAuditors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,7 +4,6 @@ import dev.flyfish.framework.auditor.ReactiveBeanAuditor;
|
|||||||
import dev.flyfish.framework.domain.authorized.AuthorizedDomain;
|
import dev.flyfish.framework.domain.authorized.AuthorizedDomain;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import dev.flyfish.framework.domain.base.Domain;
|
import dev.flyfish.framework.domain.base.Domain;
|
||||||
import lombok.Setter;
|
|
||||||
import org.springframework.beans.factory.ObjectProvider;
|
import org.springframework.beans.factory.ObjectProvider;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.mapping.callback.EntityCallback;
|
import org.springframework.data.mapping.callback.EntityCallback;
|
||||||
@ -19,13 +18,13 @@ import static org.springframework.data.util.CastUtils.cast;
|
|||||||
*/
|
*/
|
||||||
public abstract class ReactiveAuditorCallback implements EntityCallback<Domain> {
|
public abstract class ReactiveAuditorCallback implements EntityCallback<Domain> {
|
||||||
|
|
||||||
@Setter(onMethod_ = @Autowired)
|
@Autowired
|
||||||
private ObjectProvider<ReactiveBeanAuditor<Domain>> commonAuditors;
|
private ObjectProvider<ReactiveBeanAuditor<Domain>> commonAuditors;
|
||||||
|
|
||||||
@Setter(onMethod_ = @Autowired)
|
@Autowired
|
||||||
private ObjectProvider<ReactiveBeanAuditor<AuditDomain>> operationAuditors;
|
private ObjectProvider<ReactiveBeanAuditor<AuditDomain>> operationAuditors;
|
||||||
|
|
||||||
@Setter(onMethod_ = @Autowired)
|
@Autowired
|
||||||
private ObjectProvider<ReactiveBeanAuditor<AuthorizedDomain>> authorizeAuditors;
|
private ObjectProvider<ReactiveBeanAuditor<AuthorizedDomain>> authorizeAuditors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,7 +63,7 @@ public class MongoDataConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public MongoReactiveAuditorMongoCallback auditorMongoCallback() {
|
public MongoReactiveAuditorMongoCallback reactiveAuditorMongoCallback() {
|
||||||
return new MongoReactiveAuditorMongoCallback();
|
return new MongoReactiveAuditorMongoCallback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,5 @@ public class MongoReactiveAuditorMongoCallback extends ReactiveAuditorCallback i
|
|||||||
public Publisher<Domain> onBeforeConvert(@NonNull Domain entity, @NonNull String collection) {
|
public Publisher<Domain> onBeforeConvert(@NonNull Domain entity, @NonNull String collection) {
|
||||||
// 执行auditor
|
// 执行auditor
|
||||||
return audit(entity);
|
return audit(entity);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public class MongoRepositoryTest {
|
|||||||
test.setCode("ttt");
|
test.setCode("ttt");
|
||||||
test.setName("测试名称");
|
test.setName("测试名称");
|
||||||
|
|
||||||
System.out.println(testRepository.insert(test).block());
|
System.out.println(testRepository.save(test).block());
|
||||||
System.out.println(testRepository.findAll(qo).collectList().block());
|
System.out.println(testRepository.findAll(qo).collectList().block());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ public class R2dbcDataConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public R2dbcCustomConversions additionalConversions() {
|
public R2dbcCustomConversions additionalConversions() {
|
||||||
List<Object> converters = new ArrayList(this.dialect.getConverters());
|
List<Object> converters = new ArrayList<>(this.dialect.getConverters());
|
||||||
converters.addAll(R2dbcCustomConversions.STORE_CONVERTERS);
|
converters.addAll(R2dbcCustomConversions.STORE_CONVERTERS);
|
||||||
converters.addAll(AdditionalConverters.ADDING_CONVERTERS);
|
converters.addAll(AdditionalConverters.ADDING_CONVERTERS);
|
||||||
return new R2dbcCustomConversions(CustomConversions.StoreConversions.of(this.dialect.getSimpleTypeHolder(), converters),
|
return new R2dbcCustomConversions(CustomConversions.StoreConversions.of(this.dialect.getSimpleTypeHolder(), converters),
|
||||||
|
@ -29,7 +29,7 @@ import java.util.*;
|
|||||||
* @author wangyu
|
* @author wangyu
|
||||||
* 低级重写,后续官方支持后删除
|
* 低级重写,后续官方支持后删除
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
@SuppressWarnings({"rawtypes", "unchecked", "deprecation"})
|
||||||
public class FullUpdateMapper extends UpdateMapper {
|
public class FullUpdateMapper extends UpdateMapper {
|
||||||
|
|
||||||
private final R2dbcDialect dialect;
|
private final R2dbcDialect dialect;
|
||||||
|
79
pom.xml
79
pom.xml
@ -17,7 +17,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2.0.0-SNAPSHOT</revision>
|
<revision>2.0.0</revision>
|
||||||
<docker.image.prefix>flyfish</docker.image.prefix>
|
<docker.image.prefix>flyfish</docker.image.prefix>
|
||||||
<docker.plugin.version>0.27.2</docker.plugin.version>
|
<docker.plugin.version>0.27.2</docker.plugin.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
@ -37,6 +37,21 @@
|
|||||||
</developer>
|
</developer>
|
||||||
</developers>
|
</developers>
|
||||||
|
|
||||||
|
<description>飞鱼开源出品的快速开发框架</description>
|
||||||
|
<url>https://flyfish.dev</url>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache License, Version 2.0</name>
|
||||||
|
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<url>https://git.flyfish.dev/flyfish-group/flyfish-framework.git</url>
|
||||||
|
</scm>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<!--<module>wangyu-service</module>-->
|
<!--<module>wangyu-service</module>-->
|
||||||
<module>flyfish-data</module>
|
<module>flyfish-data</module>
|
||||||
@ -134,6 +149,68 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>release</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<show>package</show>
|
||||||
|
<doclint>none</doclint>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
|
<version>3.2.4</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>sign-artifacts</id>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>sign</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.sonatype.central</groupId>
|
||||||
|
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||||
|
<version>0.5.0</version>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
<configuration>
|
||||||
|
<publishingServerId>central</publishingServerId>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
104
settings.xml
104
settings.xml
@ -1,104 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
|
|
||||||
<mirrors>
|
|
||||||
<mirror>
|
|
||||||
<id>mirror</id>
|
|
||||||
<mirrorOf>!rdc-releases,!rdc-snapshots</mirrorOf>
|
|
||||||
<name>mirror</name>
|
|
||||||
<url>https://maven.aliyun.com/repository/public/</url>
|
|
||||||
</mirror>
|
|
||||||
|
|
||||||
</mirrors>
|
|
||||||
<servers>
|
|
||||||
<server>
|
|
||||||
<id>flyfish-releases</id>
|
|
||||||
<username>admin</username>
|
|
||||||
<password>YJXR19950501..</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>flyfish-snapshots</id>
|
|
||||||
<username>admin</username>
|
|
||||||
<password>YJXR19950501..</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<username>wybaby168</username>
|
|
||||||
<password>Yjxr19950501..</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>rdc-releases</id>
|
|
||||||
<username>vsUeq1</username>
|
|
||||||
<password>qATkD3fND4</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>rdc-snapshots</id>
|
|
||||||
<username>vsUeq1</username>
|
|
||||||
<password>qATkD3fND4</password>
|
|
||||||
</server>
|
|
||||||
</servers>
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>nexus</id>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>rdc-releases</id>
|
|
||||||
<url>https://repo.rdc.aliyun.com/repository/118156-release-Sw8aZv/</url>
|
|
||||||
<releases>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>rdc-snapshots</id>
|
|
||||||
<url>https://repo.rdc.aliyun.com/repository/118156-snapshot-jRK1Jp/</url>
|
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
<pluginRepositories>
|
|
||||||
<pluginRepository>
|
|
||||||
<id>rdc-releases</id>
|
|
||||||
<url>https://repo.rdc.aliyun.com/repository/118156-release-Sw8aZv/</url>
|
|
||||||
<releases>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</pluginRepository>
|
|
||||||
<pluginRepository>
|
|
||||||
<id>rdc-snapshots</id>
|
|
||||||
<url>https://repo.rdc.aliyun.com/repository/118156-snapshot-jRK1Jp/</url>
|
|
||||||
<releases>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</pluginRepository>
|
|
||||||
</pluginRepositories>
|
|
||||||
</profile>
|
|
||||||
<profile>
|
|
||||||
<id>ossrh</id>
|
|
||||||
<properties>
|
|
||||||
<!-- 由于我电脑安装的是gpg2,不存在gpg命令,所以需要指定执行gpg2,否则会报错 -->
|
|
||||||
<gpg.executable>gpg</gpg.executable>
|
|
||||||
<gpg.passphrase>19680823www</gpg.passphrase>
|
|
||||||
</properties>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
<activeProfiles>
|
|
||||||
<activeProfile>nexus</activeProfile>
|
|
||||||
</activeProfiles>
|
|
||||||
|
|
||||||
|
|
||||||
</settings>
|
|
Loading…
x
Reference in New Issue
Block a user