0
donuts
3y

Trying to migrate an app from Dropwi Card to Spring Boot but can't get the YAML config read in correctly.

It's not reading the objects/lists/maps

Just treating each line as a key value.

Spring Boot says it sorts YAML configs and one seen some projects use this without issue.

But don't know how to turn it on.

Tried a lot of @*Config* all over the project but doesn't work.

Eventually just checked what Main.java loaded in the App context and well basically it never parsed it correctly...

Comments
  • 0
    Might be a problem with automagic dependencies.

    I think spring boot had something with snake as a prefix as a library dependency for yaml support.

    If that's missing no yaml support at all.
  • 0
    @IntrusionCM hm...I had both Jackson and snake but not sure how to use at class level.

    Eventually I just created a @Bean that reads in the application-{profile}.yml to a POJO... but it's like really hacky and for this app is ok... But I don't see how this would be an acceptable limitation of Spring Boot...
  • 0
    @IntrusionCM most tutorials said import Jackson.

    Tried Gson but eventually just went with Snake
Add Comment