Java – In focframework, I can get a list of all the properties supported in the config.properties file, and how to add my own properties for use in my own

In focframework, I can get a list of all the properties supported in the config.properties file, and how to add my own properties for use in my own… here is a solution to the problem.

In focframework, I can get a list of all the properties supported in the config.properties file, and how to add my own properties for use in my own

I’m developing a web application using a full-stack framework focframework, and I want to know what I can do in config.properties Which properties are controlled in the file. Is there documentation for this?

I tried searching the docs but didn’t find anything

Obviously we can find some then from sample on GitHub by looking config.properties File:

jdbc.drivers=org.h2.Driver
jdbc.url=jdbc:h2:./myfocapplication_data_h2
jdbc.username=sa
jdbc.password=

gui.rtl=0
allowAddInsideComboBox=0

focWebServerClassName=com.focframework.sample.myfocapplication.MyFocAppWebServer
dataSourceClass=b01.focDataSourceDB.FocDataSource_DB
cloudStorageClass=com.focCloudStorage.FocCloudStorageS3
cloudStorageClass=com.foc.cloudStorage.FocCloudStorage_LocalDisc

devMode=1
unitDevMode=0
unitAllowed=1

log.dir=c:/01barmaja/log
.log. ConsoleActive=1
log.fileActive=1
log.popupExceptionDialog=1
log.dbRequest=1
log.dbSelect=1
debug.showStatusColumn=0
log.debug=1
perf.active=0

Are there any tips on how to get all of this? What if I want to add my own code to use in my code?

Solution

ConfigInfo.java file is responsible for reading all properties and storing them in variables. Understanding and checking variable names and usage is simple. But I agree that someone should work on the docs and add those parameters.

To add your own method without modifying the ConfigInfo.java, you can simply use this method in the middle of your code.

String myProperty = ConfigInfo.getProperty("my.property.with.a.meanignful.name");

Related Problems and Solutions