更新jar版本到1.4.1

This commit is contained in:
yhl452493373
2022-02-14 16:26:41 +08:00
parent 8eb297d7ad
commit cd20eb30a0
8 changed files with 11 additions and 10 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.yanghuanglin</groupId> <groupId>com.yanghuanglin</groupId>
<artifactId>seq</artifactId> <artifactId>seq</artifactId>
<version>1.3.1</version> <version>1.4.1</version>
<name>seq</name> <name>seq</name>
<description>seq</description> <description>seq</description>
<properties> <properties>

BIN
lib/seq-1.4.1-sources.jar Normal file

Binary file not shown.

BIN
lib/seq-1.4.1.jar Normal file

Binary file not shown.

10
pom.xml
View File

@@ -39,7 +39,7 @@
<dependency> <dependency>
<groupId>com.yanghuanglin</groupId> <groupId>com.yanghuanglin</groupId>
<artifactId>seq</artifactId> <artifactId>seq</artifactId>
<version>1.3.1</version> <version>1.4.1</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
@@ -92,13 +92,13 @@
<goal>install-file</goal> <goal>install-file</goal>
</goals> </goals>
<configuration> <configuration>
<file>${project.basedir}/lib/seq-1.3.1.jar</file> <file>${project.basedir}/lib/seq-1.4.1.jar</file>
<pomFile>${pom.basedir}/lib/seq-1.3.1-pom.xml</pomFile> <pomFile>${pom.basedir}/lib/seq-1.4.1-pom.xml</pomFile>
<sources>${project.basedir}/lib/seq-1.3.1-sources.jar</sources> <sources>${project.basedir}/lib/seq-1.4.1-sources.jar</sources>
<repositoryLayout>default</repositoryLayout> <repositoryLayout>default</repositoryLayout>
<groupId>com.yanghuanglin</groupId> <groupId>com.yanghuanglin</groupId>
<artifactId>seq</artifactId> <artifactId>seq</artifactId>
<version>1.3.1</version> <version>1.4.1</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<generatePom>true</generatePom> <generatePom>true</generatePom>
</configuration> </configuration>

View File

@@ -6,6 +6,7 @@ import com.yanghuanglin.seq.generator.Generator;
import com.yanghuanglin.seq.generator.impl.SequencesGenerator; import com.yanghuanglin.seq.generator.impl.SequencesGenerator;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.transaction.support.TransactionTemplate; import org.springframework.transaction.support.TransactionTemplate;
@@ -28,6 +29,7 @@ public class SeqGeneratorConfig {
return tableConfig; return tableConfig;
} }
@DependsOn("tableConfig")
@Bean @Bean
public GeneratorConfig generatorConfig(TableConfig tableConfig) { public GeneratorConfig generatorConfig(TableConfig tableConfig) {
GeneratorConfig generatorConfig = new GeneratorConfig(); GeneratorConfig generatorConfig = new GeneratorConfig();
@@ -36,9 +38,11 @@ public class SeqGeneratorConfig {
generatorConfig.setTableConfig(tableConfig); generatorConfig.setTableConfig(tableConfig);
generatorConfig.setStep(1); generatorConfig.setStep(1);
generatorConfig.setType("MISSION"); generatorConfig.setType("MISSION");
generatorConfig.setMinLength(6);
return generatorConfig; return generatorConfig;
} }
@DependsOn("generatorConfig")
@Bean @Bean
public Generator generator(GeneratorConfig generatorConfig) { public Generator generator(GeneratorConfig generatorConfig) {
return new SequencesGenerator(generatorConfig); return new SequencesGenerator(generatorConfig);

View File

@@ -27,12 +27,9 @@ public class Startup implements ApplicationRunner {
//开启多线程进行测试 //开启多线程进行测试
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(50, 50, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<>(1000)); ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(50, 50, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<>(1000));
for (int i = 0; i < 200; i++) { for (int i = 0; i < 200; i++) {
int finalI = i;
threadPoolExecutor.execute(() -> { threadPoolExecutor.execute(() -> {
Sequences sequences = generator.generate("SNT", "MISSION"); Sequences sequences = generator.generate("SNT", "MISSION");
String formattedSeq = generator.format(sequences.getSeq(), 5, "处〔#year#10801#seq#"); String formattedSeq = generator.format(sequences.getSeq(), "处〔#year#10801#seq#");
if(finalI %5==4)
System.out.println(3/0);
generator.lock(sequences); generator.lock(sequences);
set.add(formattedSeq); set.add(formattedSeq);
System.out.println(formattedSeq); System.out.println(formattedSeq);