Interesting that you ended up going all the way to Rust land instead of just using one of the multiple tools that have been created to help with this, like:
* Spring Boot (it has a UI to create projects where you pick Java version, DB, build tool, some libs etc): https://spring.io/guides/gs/spring-boot
* JHipster - the nuclear option, pick what you want a la carte: https://www.jhipster.tech/
* JBang - a cute CLI for this: https://www.jbang.dev/
* Maven Archetypes - the old fashioned way (existed before "create-app" kind of tools appeared): https://maven.apache.org/guides/introduction/introduction-to...
And most IDEs also have "new project" wizzards.