How read config env in an other config file?

help me about an issue:

rebar3.config


{relx, [{release, []

[sasl]},

{mode, minimal},

{extended_start_script, true},

{sys_config, "config/sys.config"},

{vm_args, "config/vm.args"},

{overlay, [{copy, "config/prod_db.config", "releases/0.1.10/prod_db.config"}]}

]}.

{profiles, [{prod, [{relx, [

{mode, prod},

{extended_start_script, true},

{sys_config_src, "config/sys.config.src"},

{vm_args_src, "config/vm.args.src"}

]}

]}

]}.

{shell, [

{config, "config/dev_sys.config.src"}

]}.

sys.config.src

["prod_db",

{nova, {123}}

]

app.src


{application, 11,

[{description, "11"},

{vsn, "0.1.0"},

{registered, []},

{mod, {11_app, []}},

{included_applications, []},

{applications,

[kernel,

stdlib

]},

{env,[]},

{modules, []}

]}.

prod_db.config


[{pgpool, [

{pools, [

{pool_db, [

{size, 2},

{connection_options, [

{host, "localhost"},

{user, "root"},

{port, 3306},

{password, "123456"},

{database, "testdb"},

{keep_alive, true},

{connect_timeout, 18000}

]}

]}

]}

]}

].

When I print the environment variables in app_sup


lager:info("All database connection parameters: ~p~n", [application:get_all_env(pgpool)]),

lager:info("All nova parameters: ~p~n", [application:get_all_env(nova)]),

The first database connection address is always read as empty , while the second one prints the actual result.

Even after moving the configuration in prod_db.conf to sys.config.src, it still cannot be read.

Why is this?

sorry for ask this question, i find it … need add a
my_app{} outside

The following method is effective?

application:get_env(App, Attr)

Sorry, I didn’t reply earlier. In the prod_db.conf file, I changed the top-level node from pgpool to epgsql, and then I was able to read the configuration information.