clear-config
clear-config copied to clipboard
how to read variable values from application.conf that are in .env file
@japgolly
my application.conf file contains variable to be read from .env and when i run this i get an error.Though other values have been read only variables are the problem. // app.conf myapp.dbconfig.threads-pool-count = 2 myapp.dbconfig.threads-pool-count = ${?DB_THREAD_POOL_COUNT} // queueSize The size of the job queue, 0 for direct hand-off or -1 for unlimited size. myapp.dbconfig.queue-size = 50 myapp.dbconfig.queue-size = ${?DB_QUEUE_SIZE} myapp.dbconfig.search-limit = 10 myapp.dbconfig.search-limit = ${?SEARCH_LIMIT}
error:-
Exception in thread "main" java.lang.RuntimeException: 3 errors: [error] - Error reading key [myapp.dbconfig.queue-size] from source [cp:/application.conf] with value [${DB_QUEUE_SIZE}]: Int expected. [error] - Error reading key [myapp.dbconfig.search-limit] from source [cp:/application.conf] with value [${SEARCH_LIMIT}]: Int expected. [error] - Error reading key [myapp.dbconfig.threads-pool-count] from source [cp:/application.conf] with value [${DB_THREAD_POOL_COUNT}]: Int expected. [error] 5 sources (highest to lowest priority): [error] - Env