Compare commits
2 Commits
970eb892fb
...
9d693d3254
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d693d3254 | ||
|
|
75be93a629 |
Binary file not shown.
Binary file not shown.
@@ -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.0.0</version>
|
<version>1.1.0</version>
|
||||||
<name>seq</name>
|
<name>seq</name>
|
||||||
<description>seq</description>
|
<description>seq</description>
|
||||||
<properties>
|
<properties>
|
||||||
BIN
lib/seq-1.1.0-sources.jar
Normal file
BIN
lib/seq-1.1.0-sources.jar
Normal file
Binary file not shown.
BIN
lib/seq-1.1.0.jar
Normal file
BIN
lib/seq-1.1.0.jar
Normal file
Binary file not shown.
10
pom.xml
10
pom.xml
@@ -39,7 +39,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.yanghuanglin</groupId>
|
<groupId>com.yanghuanglin</groupId>
|
||||||
<artifactId>seq</artifactId>
|
<artifactId>seq</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.1.0</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.0.0.jar</file>
|
<file>${project.basedir}/lib/seq-1.1.0.jar</file>
|
||||||
<pomFile>${pom.basedir}/lib/seq-1.0.0-pom.xml</pomFile>
|
<pomFile>${pom.basedir}/lib/seq-1.1.0-pom.xml</pomFile>
|
||||||
<sources>${project.basedir}/lib/seq-1.0.0-sources.jar</sources>
|
<sources>${project.basedir}/lib/seq-1.1.0-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.0.0</version>
|
<version>1.1.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<generatePom>true</generatePom>
|
<generatePom>true</generatePom>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ public class SeqGeneratorConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
public TableConfig tableConfig() {
|
public TableConfig tableConfig() {
|
||||||
TableConfig tableConfig = new TableConfig();
|
TableConfig tableConfig = new TableConfig();
|
||||||
// tableConfig.setTable("sequences");
|
tableConfig.setTable("sequences");
|
||||||
// tableConfig.setKeyColumn("SEQUENCE_KEY");
|
tableConfig.setKeyColumn("SEQUENCE_KEY");
|
||||||
// tableConfig.setTypeColumn("SEQUENCE_TYPE");
|
tableConfig.setTypeColumn("SEQUENCE_TYPE");
|
||||||
// tableConfig.setSeqColumn("SEQUENCE_NEXT_ID");
|
tableConfig.setSeqColumn("NEXT_ID");
|
||||||
return tableConfig;
|
return tableConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,9 +27,12 @@ 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(), 5, "处〔#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);
|
||||||
|
|||||||
Reference in New Issue
Block a user