Rey Libutan Rey Libutan - 2 months ago 26
YAML Question

Dropwizard - Where is my YML file?

I followed the Getting Started guide of Dropwizard by executing the maven command below:

mvn archetype:generate -DarchetypeGroupId=io.dropwizard.archetypes -DarchetypeArtifactId=java-simple -DarchetypeVersion=0.9.1


I was able to run, modify the project and all but I can't find any YML file in the project?

Just to clarify, is this something that I should create by myself or was I wrong in assuming that it will be generated by itself?

Answer

Yes, I don't think a YAML file is generated by itself since Dropwizard can function without having one.

It's only when you tweak an inbuilt configuration or add one of your own, you'll need to specify it the AppConfiguration class and provide the corresponding values in configuration.yaml file.

P.S: There are other ways of providing the configuration like passing it as JVM args as described here but I wouldn't recommend using them.