Compare commits

..

No commits in common. "84fe5afc62d060b5111901a0c4d56a63281172b2" and "b29961b0bf36b7e728effa02db2f5a45433cac68" have entirely different histories.

1 changed files with 1 additions and 4 deletions

View File

@ -10,17 +10,14 @@ import org.aohe.core.utils.SystemUtils;
import org.aohe.core.web.SocketFactory;
import javax.swing.*;
import java.nio.file.Path;
@Slf4j
public class Main {
private static final String JAVA_IO_TMPDIR = System.getProperty("java.io.tmpdir");
public static void main(String[] args) {
log.info(" 当前系统类型: {}", SystemUtils.getOsName());
AppLocker locker = AppLocker.create("aoheSaneServiceLock").setPath( Path.of(JAVA_IO_TMPDIR) ).build();
AppLocker locker = AppLocker.create("aoheSaneServiceLock").build();
try {
//启动锁只允许启动一个
locker.lock();