Config property in database is not displayed

Hello,

I created the following Config class in project (Platform 6.10)

import com.haulmont.cuba.core.config.Property;
import com.haulmont.cuba.core.config.Source;
import com.haulmont.cuba.core.config.SourceType;
import com.haulmont.cuba.core.config.defaults.Default;

@Source(type = SourceType.DATABASE)
public interface ReportsConfig  extends com.haulmont.cuba.core.config.Config {


    @Property("agentes.reports.path")
    @Default("${catalina.base}/agentes/app/reports")
    String getReportsPath();

}

but the property does not displayed in Application -> Applicaton Properties. :slightly_frowning_face:

I use the config property in a CustomReport implementation, where I use AppUtils to get a instance of the config class:

public class JasperReportsEngine implements CustomReport {
    ...
    private Path reportPath;
    ...
    public JasperReportsEngine() {
        ReportsConfig config = AppBeans.get(Configuration.class)
                .getConfig(ReportsConfig.class);
        this.reportPath = Paths.get(substituteProperties(config.getReportsPath()));
    }
    ...
}

Greetings
Andreas

Hi,

I found the problem: I ReportConfig class was outside the package which Spring scans. I move the class to another package and now it works. :slight_smile:

Greetings
Andreas

2 Likes