I have configuration properties for de Supplier:
@Data
@NoArgsConstructor
@ConfigurationProperties("sybase.supplier")
public class SybaseSupplierProperties {
private short canal = 0;
private int pollSize = 10;
}
I am injecting it on the application:
@SpringBootApplication
@EnableConfigurationProperties(SybaseSupplierProperties.class)
public class SybaseSupplier {
private final DataSource dataSource;
private final SybaseSupplierProperties properties;
@Autowired
public SybaseSupplier(DataSource dataSource,
SybaseSupplierProperties properties) {
this.dataSource = dataSource;
this.properties = properties;
}
}
I have the maven dependency to generate it:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
It is generated as spring-configuration-metadata.json
{
"groups": [
{
"name": "sybase.supplier",
"type": "br.com.clamed.daflow.apps.sybasesupplier.SybaseSupplierProperties",
"sourceType": "br.com.clamed.daflow.apps.sybasesupplier.SybaseSupplierProperties"
}
],
"properties": [
{
"name": "sybase.supplier.canal",
"type": "java.lang.Short",
"sourceType": "br.com.clamed.daflow.apps.sybasesupplier.SybaseSupplierProperties",
"defaultValue": 0
},
{
"name": "sybase.supplier.poll-size",
"type": "java.lang.Integer",
"sourceType": "br.com.clamed.daflow.apps.sybasesupplier.SybaseSupplierProperties",
"defaultValue": 10
}
],
"hints": []
}
application.properties
spring.cloud.stream.function.bindings.intControleSupplier-out-0=output
spring.cloud.function.definition=intControleSupplier
Internal maven repo is registed.
The app is imported:
app register --name jdbc-sybase-supplier --type source --uri maven://br.com.clamed.cloud.dataflow.apps:jdbc-sybase-supplier:1.0.0-SNAPSHOT
When I use it, properties do not show:
Why?