更新jar版本到1.4.1
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.yanghuanglin</groupId>
|
||||
<artifactId>seq</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.4.1</version>
|
||||
<name>seq</name>
|
||||
<description>seq</description>
|
||||
<properties>
|
||||
BIN
lib/seq-1.4.1-sources.jar
Normal file
BIN
lib/seq-1.4.1-sources.jar
Normal file
Binary file not shown.
BIN
lib/seq-1.4.1.jar
Normal file
BIN
lib/seq-1.4.1.jar
Normal file
Binary file not shown.
10
pom.xml
10
pom.xml
@@ -39,7 +39,7 @@
|
||||
<dependency>
|
||||
<groupId>com.yanghuanglin</groupId>
|
||||
<artifactId>seq</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.4.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
@@ -92,13 +92,13 @@
|
||||
<goal>install-file</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<file>${project.basedir}/lib/seq-1.3.1.jar</file>
|
||||
<pomFile>${pom.basedir}/lib/seq-1.3.1-pom.xml</pomFile>
|
||||
<sources>${project.basedir}/lib/seq-1.3.1-sources.jar</sources>
|
||||
<file>${project.basedir}/lib/seq-1.4.1.jar</file>
|
||||
<pomFile>${pom.basedir}/lib/seq-1.4.1-pom.xml</pomFile>
|
||||
<sources>${project.basedir}/lib/seq-1.4.1-sources.jar</sources>
|
||||
<repositoryLayout>default</repositoryLayout>
|
||||
<groupId>com.yanghuanglin</groupId>
|
||||
<artifactId>seq</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.4.1</version>
|
||||
<packaging>jar</packaging>
|
||||
<generatePom>true</generatePom>
|
||||
</configuration>
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.yanghuanglin.seq.generator.Generator;
|
||||
import com.yanghuanglin.seq.generator.impl.SequencesGenerator;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.transaction.support.TransactionTemplate;
|
||||
|
||||
@@ -28,6 +29,7 @@ public class SeqGeneratorConfig {
|
||||
return tableConfig;
|
||||
}
|
||||
|
||||
@DependsOn("tableConfig")
|
||||
@Bean
|
||||
public GeneratorConfig generatorConfig(TableConfig tableConfig) {
|
||||
GeneratorConfig generatorConfig = new GeneratorConfig();
|
||||
@@ -36,9 +38,11 @@ public class SeqGeneratorConfig {
|
||||
generatorConfig.setTableConfig(tableConfig);
|
||||
generatorConfig.setStep(1);
|
||||
generatorConfig.setType("MISSION");
|
||||
generatorConfig.setMinLength(6);
|
||||
return generatorConfig;
|
||||
}
|
||||
|
||||
@DependsOn("generatorConfig")
|
||||
@Bean
|
||||
public Generator generator(GeneratorConfig generatorConfig) {
|
||||
return new SequencesGenerator(generatorConfig);
|
||||
|
||||
@@ -27,12 +27,9 @@ public class Startup implements ApplicationRunner {
|
||||
//开启多线程进行测试
|
||||
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(50, 50, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<>(1000));
|
||||
for (int i = 0; i < 200; i++) {
|
||||
int finalI = i;
|
||||
threadPoolExecutor.execute(() -> {
|
||||
Sequences sequences = generator.generate("SNT", "MISSION");
|
||||
String formattedSeq = generator.format(sequences.getSeq(), 5, "处〔#year#〕10801#seq#");
|
||||
if(finalI %5==4)
|
||||
System.out.println(3/0);
|
||||
String formattedSeq = generator.format(sequences.getSeq(), "处〔#year#〕10801#seq#");
|
||||
generator.lock(sequences);
|
||||
set.add(formattedSeq);
|
||||
System.out.println(formattedSeq);
|
||||
|
||||
Reference in New Issue
Block a user