I have a App service spring web app (Not Azure spring Apps).
I created a connection string - SQLConnectionSTRING
This stackoverflow link gives some info but not an answer stackoverflow question
Code:
@Value("${connection:absent}")
private String connection ;
Result : absent
How can I read the connection string in my app ?
(Note: Attempt 1: System.getenv("SQLConnectionSTRING") also did not work
Attempt 2 : > addding this to application props connection=${SQLConnectionSTRING} won't build at all, so does not work
Attempt3 : @Autowired private Environment environment; environment.getProperty("SQLConnectionSTRING"); also not working)