mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-16 06:16:51 +08:00
33 lines
847 B
Java
33 lines
847 B
Java
package com.xboe;
|
|
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.boot.system.ApplicationPid;
|
|
import org.springframework.cache.annotation.EnableCaching;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
@Configuration
|
|
@SpringBootApplication
|
|
@EnableCaching
|
|
public class BoeServerCaseApplication {
|
|
|
|
public static void main(String[] args) {
|
|
System.setProperty("jasypt.encryptor.password","jasypt");
|
|
SpringApplication.run(BoeServerCaseApplication.class, args);
|
|
}
|
|
|
|
@PostConstruct
|
|
private void handlePid() throws IOException {
|
|
File file = new File("application-case.pid");
|
|
new ApplicationPid().write(file);
|
|
file.deleteOnExit();
|
|
}
|
|
|
|
|
|
}
|