strongbox: YamlFileManager should not rely on ConfigurationResourceResolver

Task Description

org.carlspring.strongbox.yaml.YamlFileManager classes are too complex and should be simplified.

We should benefit from spring boot configuration order and keep the defaults in the application.properties (or YAML equivalent, see #1167).

Tasks

  • Get rid of org.carlspring.strongbox.yaml.YamlFileManager#getPropertyKey and org.carlspring.strongbox.yaml.YamlFileManager#getDefaultLocation. org.carlspring.strongbox.yaml.YamlFileManager and all of its kids should not rely/depend on org.carlspring.strongbox.resource.ConfigurationResourceResolver.
  • use @Value annotation (or better alternative from Spring/Spring Boot) to server the Resource.
  • org.carlspring.strongbox.yaml.YamlFileManager#getResource probably should be abstract (or propose some better alternative)

Help

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (13 by maintainers)

Most upvoted comments

Thanks for improving how this works, @bono007 ! 😃

Let me get that other PR in we are talking about - its related to the cleanup

@bono007 ,

My comments were more for your better understanding of why this looks like this. You can try it like @fuss86 has explained. If it works, we’ll review it and see where it leads us. Clearly, it will make things simpler and hopefully there won’t be any fallout. 😃

Please, bear in mind that you’ll have to try things with the strongbox-distribution, befor we can merge it. I’m quite sure it will give us some sort of grief to deal with.

But… we have to break things in order to improve them.

I think you can use this one.

@bono007 ,

Please, feel free to proceed!

Go for it! 😃