mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-12 12:26:51 +08:00
45 lines
1.4 KiB
Java
45 lines
1.4 KiB
Java
package com.xboe;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
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.cloud.client.discovery.EnableDiscoveryClient;
|
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.retry.annotation.EnableRetry;
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
import javax.annotation.PostConstruct;
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
|
|
@Configuration
|
|
@SpringBootApplication
|
|
@EnableCaching
|
|
@EnableAsync
|
|
@EnableRetry
|
|
@EnableScheduling
|
|
@EnableDiscoveryClient
|
|
@EnableFeignClients(basePackages = {"com.boe.feign.api.*.remote", "com.xboe.api"})
|
|
@Slf4j
|
|
public class BoeServerAllApplication {
|
|
|
|
public static void main(String[] args) {
|
|
System.setProperty("jasypt.encryptor.password", "jasypt");
|
|
SpringApplication.run(BoeServerAllApplication.class, args);
|
|
log.info("== BOE启动成功 ==");
|
|
}
|
|
|
|
@PostConstruct
|
|
private void handlePid() throws IOException {
|
|
File file = new File("application.pid");
|
|
new ApplicationPid().write(file);
|
|
file.deleteOnExit();
|
|
}
|
|
|
|
|
|
}
|