Yep.
I did notice it. That was my original concern. All the resource beans
get registered to all applications.
I have been trying to determine a way to restrict this specific behaviour.
Looks like the only option I have in my application is to restrict the user
calls to the specific resources.
Thanks,
Lloyd
On Sat, Feb 5, 2022 at 9:24 AM Wei Nan Li <weli(a)redhat.com> wrote:
I further test the example project and found the two application
cannot
separate the registered services, and they become mixed up:
➤ curl --location --request POST 'http://localhost:8080/sample-app/echo2' \
11:05:45
--header 'Content-Type: text/plain' \
--data-raw 'is there anybody out there?'
{"timestamp":1644033044404,"echoText":":::ECHO2:::is there
anybody out there?"}⏎
weli@ovpn-12-23:~/works
➤ curl --location --request POST 'http://localhost:8080/sample-app2/echo' \
11:50:44
--header 'Content-Type: text/plain' \
--data-raw 'is there anybody out there?'
{"timestamp":1644033052902,"echoText":"is there anybody out
there?"}⏎
weli@ovpn-12-23:~/works
So I think this is a bug to be fixed.
This PR is related with the issue, and I’ll manage to fix it:
-
https://github.com/resteasy/resteasy-spring-boot/pull/30
Currently I don’t have a time schedule to work on this. If I have made
progress on this issue I’ll update the relative issue/pull request.
在 2022年1月18日 上午1:38:11, Lloyd Fernandes (lloydstudy13(a)gmail.com) 写到:
Team,
I am trying to integrate my existing project from RestEasy implementation
to SpringBoot 2.x
My current project settings has two application
classes(javax.ws.rs.core.Application): App1 and App2
Three Provider Classes: P1, P2 and P3
The providers are registered to the applications as follows:
App1 --> P1, P2
App2 --> P1, P3
Applications are registered by updating the singletons set in the
Application Constructors of App1 and App2. Example:
public App1{ singletons.add(new P1()); singletons.add(new P2());}
I was referencing the RestEasy - SpringBootStarter :
https://github.com/resteasy/resteasy-spring-boot/blob/main/mds/USAGE.md.
Had the following questions after reading the description:
1. I do not see the use of such singletons recommended anymore. So how do
I ensure, that the Providers are registered to the correct Application?
2. How do i convert the context param, filter-mapping, login-config,
security constraint configurations defined in web.xml to the equivalent
SpringBoot configurations that would work with Rest Easy.
3. What has more precedence the SpringBoot Security modules or the
RestEasy security constraints?
_______________________________________________
resteasy mailing list -- resteasy(a)lists.jboss.org
To unsubscribe send an email to resteasy-leave(a)lists.jboss.org