-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ehance native backend documentation #2647
Comments
Can you provide a more complete example of the problem? I am not sure I understand what the issue or suggestion is. |
Documentation does not say about the possibility to create the NativeEnvironmentRepository, only says about the |
That is true of every bean that is conditionally activated. If the bean is not created for some reason you have the option to create it yourself. We don't typically document those things, we try to document functionality instead. |
This documentation could be helpful in cases when someone needs to manage different profiles, as I mentioned. I spent some time figuring it out... |
So why not activate multiple profiles? |
Well, I tried it, but didn't work. I don't know why but the only way for me was creating the NativeEnvironmentRepository |
It should work. In fact we explicitely call that out in the documentation as a way of supporting multiple EnvironmentRepositorys |
But that wasn't the problem. The NativeEnvironmentRepository was needed to use one repository (native) with multiple profiles |
The additional profiles were unrelated to the config server? |
In my specific case I intended to use config server for resource bundles to another apis. But I needed to use it with local files, so I needed to use the profile=native. |
Can you provide a sample that reproduces the problem? |
I'll create a sample project and share it here :) |
Documentation says that to use native file backend is necessary to use
spring.profiles.active=native
.But if it's necessary to use different profiles (embedded config server with local files for example) it'd be impossible to change behavior for staging or production for example.
In such cases it's possible to use a different profile from native and create a
NativeEnvironmentRepository
Bean:The text was updated successfully, but these errors were encountered: