Compare commits

..

No commits in common. "c192fcf9540fcf50b0968b438a61c72e485f56c5" and "9b1138d62aa12a88b981420f516547943ae067ee" have entirely different histories.

2 changed files with 2 additions and 17 deletions

View File

@ -6,7 +6,7 @@
<groupId>org.aohe</groupId>
<artifactId>sane-service</artifactId>
<version>0.3.2</version>
<version>0.3.1</version>
<name>aohe-sane-service</name>
@ -71,12 +71,6 @@
<version>3.4.1</version>
<classifier>no-natives</classifier>
</dependency>
<dependency>
<groupId>io.github.sanyarnd</groupId>
<artifactId>app-locker</artifactId>
<version>1.2.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.formdev</groupId>-->
<!-- <artifactId>flatlaf</artifactId>-->

View File

@ -1,7 +1,6 @@
package org.aohe;
import com.formdev.flatlaf.FlatDarculaLaf;
import io.github.sanyarnd.applocker.AppLocker;
import lombok.extern.slf4j.Slf4j;
import org.aohe.core.sane.utils.SaneSessionUtils;
import org.aohe.core.swing.NewWindow;
@ -15,21 +14,13 @@ import javax.swing.*;
public class Main {
public static void main(String[] args) {
log.info(" 当前系统类型: {}", SystemUtils.getOsName());
try (AppLocker locker = AppLocker.create("aoheSaneServiceLock").build()){
//启动锁只允许启动一个
locker.lock();
try {
//设置窗口主题
//FlatLightLaf.setup();
UIManager.setLookAndFeel(new FlatDarculaLaf());
} catch (UnsupportedLookAndFeelException e) {
throw new RuntimeException(e);
} catch (Exception ex) {
log.info("应用已经启动,当前进程退出。");
System.exit(0);
}
//初始化其他资源
init();