forked from open-job/openjob
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LogProperties.java
61 lines (52 loc) · 1.71 KB
/
LogProperties.java
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
package io.openjob.server.log.autoconfigure;
import io.openjob.server.log.constant.LogStorageConstant;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* @author stelin swoft@qq.com
* @since 1.0.0
*/
@Data
@ConfigurationProperties(prefix = "openjob.log")
public class LogProperties {
private Storage storage = new Storage();
@Data
public static class Storage {
private String selector = LogStorageConstant.H2;
private Integer queryMaxSize;
private H2Properties h2 = new H2Properties();
private MysqlProperties mysql = new MysqlProperties();
private TidbProperties tidb = new TidbProperties();
private Elasticsearch7Properties elasticsearch7 = new Elasticsearch7Properties();
}
@Data
public static class H2Properties {
private JdbcProperties properties = new JdbcProperties();
}
@Data
public static class MysqlProperties {
private JdbcProperties properties = new JdbcProperties();
}
@Data
public static class TidbProperties {
private JdbcProperties properties = new JdbcProperties();
}
@Data
public static class Elasticsearch7Properties {
private String clusterNodes;
private String username;
private String password;
private String protocol = "http";
private Integer connectTimeout = 3000;
private Integer socketTimeout = 3000;
private Integer responseTimeout = 3000;
private Integer bufferLimit = 104857600;
}
@Data
public static class JdbcProperties {
private String driver;
private String url;
private String user;
private String password;
}
}