Skip to content
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

Remove usage of org.springframework.remoting.support.RemoteExporter #303 #312

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cyb3r4nt
Copy link
Contributor

Remove usage of org.springframework.remoting.support.RemoteExporter #303

RemoteExporter was used mostly as data holder for service and serviceInterface properties.
Remoting support was removed from Spring Framework 6 and Spring does not provide this class anymore.

This change moves required service and serviceInterface fields from RemoteExporter into AbstractJsonServiceExporter and removes usage of RemoteExporter.
(See also comment #303 (comment))
Other bean registration logic was not changed.

This new version may fail for the users who inherited from the AbstractJsonServiceExporter class or its descendants,
and directly use any functionality inherited from RemoteExporter.

I tested this with Spring Framework 6 and there were no class loading related problems in my env.

…ter down into AbstractJsonServiceExporter

RemoteExporter is deprecated and is now removed from Spring Framework v6+.
It was used only to provide service and serviceInterface properties
and some related methods.
User defined Java services are registered in the Spring MVC using BeanNameUrlHandlerMapping,
and RemoteExporter provided only some base functionality for accessing service class and interface.
This functionality may be pulled down to AbstractJsonServiceExporter,
and this preserves compatibility in existing applications,
which use service and serviceInterface properties.


Signed-off-by: cyb3r4nt <[email protected]>
…nd mark access methods as deprected

RemoteExporter is deprecated and has been removed from Spring Framework starting from v6.
This change removes registerTraceInterceptor parameter registration in RemoteExporter.

Methods are marked as @deprecated to preserve compile-time compatibility.


Signed-off-by: cyb3r4nt <[email protected]>
…n the application context

Adds same Spring Context XML configuration as described in the README
and verifies that beans are properly registered.


Signed-off-by: cyb3r4nt <[email protected]>
@AndreMCCarvalho
Copy link

Any deadline on merging this?

@tyro-jason
Copy link

tyro-jason commented Sep 12, 2023

I think Spring Boot 2.x apps will need to bump by November to avoid OSS EOL...
https://endoflife.date/spring-boot
Which i think maps to a shift to Spring 6.x and hence no remoting

@peothach
Copy link

peothach commented Oct 31, 2023

Hi @briandilley, could you help review this PR and release a new version for this?
My current project needs to upgrade to Spring 6.x and now I'm stuck with this issue.
java.lang.NoClassDefFoundError: org/springframework/remoting/support/RemoteExporter.

Thanks a lot <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants