41 lines
984 B
Java
41 lines
984 B
Java
package com.klp.config;
|
|
|
|
import lombok.Data;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
/**
|
|
* Stamp service configuration.
|
|
*/
|
|
@Data
|
|
@Component
|
|
@ConfigurationProperties(prefix = "stamp")
|
|
public class StampProperties {
|
|
|
|
private PythonService pythonService = new PythonService();
|
|
private JavaService javaService = new JavaService();
|
|
|
|
@Data
|
|
public static class PythonService {
|
|
/**
|
|
* Whether to call external python stamp service.
|
|
*/
|
|
private boolean enabled = false;
|
|
private String baseUrl;
|
|
private String apiKey;
|
|
private Integer timeoutMs = 5000;
|
|
}
|
|
|
|
@Data
|
|
public static class JavaService {
|
|
/**
|
|
* Enable in-Java stamping.
|
|
*/
|
|
private boolean enabled = true;
|
|
/**
|
|
* Default DPI for px → user-space conversion if needed.
|
|
*/
|
|
private Integer dpi = 72;
|
|
}
|
|
}
|