-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAppProperties.java
More file actions
27 lines (23 loc) · 860 Bytes
/
AppProperties.java
File metadata and controls
27 lines (23 loc) · 860 Bytes
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
package cane.brothers.gpt.bot;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotNull;
import java.util.List;
@Validated
@ConfigurationProperties(prefix = "tgbot")
public record AppProperties(
@NotNull(message = "The property 'tgbot.token' is required")
String token, HttpProxy proxy,
String voicePath,
String infoUrl,
List<String> allowedUserNames) {
public record HttpProxy(
@NotNull(message = "The property 'tgbot.proxy.hostname' is required")
String hostname,
@NotNull(message = "The property 'tgbot.proxy.port' is required")
Integer port,
String username,
String password,
String method) {
}
}