If version in pom.xml isnt mentioned, then how does spring boot know which version to use ?
The version belonging the parent module will be referenced. Spring Boot starter comes with a lot of libraries in-built, with is referenced as a parent in the pom.xml file of your project
Click on spring-boot-starter-parent and to open its' pom.xml and then open spring-boot-dependencies and you will find the list of version of each dependencies mentioned in it, used the specific spring-boot version you are using.
Now, if we have a child module in our spring application, and if we dont specify the version number, we either need to mention the parent pom or specify the version there.