-
Notifications
You must be signed in to change notification settings - Fork 51
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
Support for ZK custom scopes: "desktop", etc. #7
Comments
sorry about the delay ... we were busy with the ZK 8.6.0 release, I'll get back to you soon |
I tested the "old-dependency" zkspring-core:3.2.0 and it still works as before. No workaround was needed on my side. I agree a Java configuration approach would be preferable and we'll consider it when upgrading the dependencies for spring 4/5. For now spring 4/5 still support XML configuration as before ... (especially for legacy libraries) As you did: add the dependency and exclude the obsolete versions (this should be improved on our side in the next release)
Then create a small XML config file - XML does not bite ;) e.g. /resources/zkscopes-config.xml
And then import it in the application.
When starting spring boot it picks up the config file.
After that I was able to annotate and use beans with I agree this is quite ugly but still works without any change from the documented usage. |
Also I think a java config options should be provided from zkspring-core before adding a config property to the zkspringboot autoconfig project. I created the FR |
@gushakov which custom zk scopes are you still using... I assume only The others (idspace, page, component, execution) seem obsolete to me I am planning to clean up trying to remove deprecated and obsolete configuration classes |
I added a simple version to add the most common ZK scopes webapp/desktop/execution currently just in a branch 'development'
If you needed you can also implement your own CustomScopeConfigurer adding the other scope classes from zkspring-core. Often that's not necessary so I just provided them here. Would does this work? |
zkspring-core 4.0.0 has been released (compatible with spring 4/5) providing a java config option
|
Hello,
Thank you for creating this very useful starter.
In our team we've noticed that, apparently, custom scopes ("desktop", etc.) are not yet supported.
Example:
Declare a converter bean.
Register it with a view-model.
Try to use it, there is an exception.
Workaround
The way we are working around this is to do what the old
<zk-config/>
XML configuration was doing.zkspring-core-3.2.0
in our POM.This way we are able to use the beans with the custom scopes.
Question
This does not seem like a long-term solution since it depends on the old dependency
zkspring-core
. Would you please consider adding support for custom scoped beans.Thank you,
George
The text was updated successfully, but these errors were encountered: