BroAdminAuthApplication.java
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package cn.brotop.auth;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import cn.brotop.common.security.annotation.EnableRyFeignClients;
import org.springframework.core.io.ClassPathResource;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
/**
* 认证授权中心
*
* @author 啊雷
*/
@EnableRyFeignClients
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
public class BroAdminAuthApplication
{
public static void main(String[] args)
{
SpringApplication.run(BroAdminAuthApplication.class, args);
// 启动成功后打印启动 Banner
printlnStartBanner();
}
public static void printlnStartBanner(){
ClassPathResource classPathResource = new ClassPathResource("banner_start.txt");
InputStream inputStream = null;
BufferedReader in = null;
try {
if (classPathResource.exists()){
in = new BufferedReader(new InputStreamReader(classPathResource.getInputStream(), "UTF-8"));
String line = null;
while ((line = in.readLine()) != null){
System.out.println("\t" + line);
}
}
}catch (Exception e){
e.printStackTrace();
}finally {
try {
if (inputStream != null){
inputStream.close();
}
}catch (Exception e){
e.printStackTrace();
}
try {
if (in != null){
in.close();
}
}catch (Exception e){
e.printStackTrace();
}
}
}
}