Issue
is there any way to moving dependencies from pom.xml to application.properties file?
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.3</version>
</dependency>
somehow move to src/main/resources/application.properties?
Solution
Your mentor is not asking you to move the dependencies to the file application.properties
, but to move the dependency versions to the <properties>
section of the maven file (pom.xml
).
Example:
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
And then in the <properties
section:
<properties>
<postgresql.version>42.3.3</postgresql.version>
</properties>
Answered By - RoToRa
Answer Checked By - Terry (JavaFixing Volunteer)