I may guess that you need to have only isAuthenticated() configuration in the http section of your security config, so on this layer all the authorized users will have access to REST API, and then...
Type: Posts; User: alex.j; Keyword(s):
I may guess that you need to have only isAuthenticated() configuration in the http section of your security config, so on this layer all the authorized users will have access to REST API, and then...
I tried to add entry-point-ref to http block, and, well, despite some minor issues it works almost as expected.
Thank you so much!
As for me I come to believe there is no simple solution for my problem and I found a very simple workaround:
Let me remind that basically I have two distinct kind of users - scripts (or say external...
Thanks for pointing to the error in configuration. Unfortunately basic auth does not work with the proposed config (unauthorized users receive 302 Redirect).
Sure.
I've created gist with full stacktrace and some logs: https://gist.github.com/avshabanov/ed88130bdaf940563f72
Unfortunately this forum does not support messages that exceed 10K symbols...
Thank you for your answer.
I tried to use the proposed approach and end up with the following config:
<beans:beans xmlns="http://www.springframework.org/schema/security"
...
This is a duplicate of my question posted to stackoverflow a day ago.
Basically the question is what is the elegant configuration solution (if any) to
* Allow authorized user to access REST API...
I've raised improvement against spring core: https://jira.springsource.org/browse/SPR-9828
As for intentionally splitting checking and assignment - the proposed improvement allows keeping the old...
I'm agree on nullable method, it looks alien in the Assert class.
But for returning values in the Assert methods - why not? This wouldn't break the existing code and yet introduce convenient way of...
I believe it'd be great to change signature of the spring's Assert.* static methods so each of them will return the checked value.
So the verified code would look as follows:
or even shorter...
I'll check this, thank you.
Consider the following spring integration's XML configuration snippet:
<int:inbound-channel-adapter id="inboundChannel" ref="myService" method="myProducerMethod">
<int:poller...
Yep, I see.
Thank you for clarification.
Thanks a lot, it works.
I was confused by multiple means of introducing the same configuration - @EnableWebMvc with optional possibility to either extend WebMvcConfigurerAdapter or extend...
I need to support the following servlet mapping: all *.html and *.do links and all the REST-style URLs that starts with /rest.
I ended up with the following config in the web.xml:
...
Thanks a lot!
After digging deeper at this question I decided to refuse this architecture and rather prepare to face potential performance problem and if facing one deal with it in another, less...
The problem is as follows:
I need to start "global" transaction in certain "main" thread.
Then a few "child" threads started in "main" thread and all of these threads share that "global"...
Oh, I see. Thank you all so much for clarification.
I'm sorry for my ignorance, three peoples point me to the right direction but I didn't catch it.
Thanks again, I'll try it :)
I've created a project on github that reproduces the issue: https://github.com/avshabanov/bugrep/tree/master/src/spring31-validation-bug
The REST controller is...
Can you please clarify with more details on this?
The following mapping does not work for me (taken from the real code, BindingResult is not used):
I believe that fix was not integrated to the release trunk (at least not for 3.1.0.RELEASE) as the relevant binding code simply will not validate if the bound parameter is marked both with...
I'm using Spring 3.1.0.RELEASE and the bug https://jira.springsource.org/browse/SPR-6709 is still reproduced, though it is mentioned that fix provided for 3.1.0.M2.
Was it ever been integrated?
In case someone is interested: I've finally found how to do it, thanks to the comprehensive spring javadoc:
The most important lines emphasized in bold.
For some reason I can't use XML configuration (and thus ClassPathXmlApplicationContext). And I've to specify the entire configuration in code (by using StaticApplicationContext.registerSingleton).
...
Hi all,
Is it safe to rely on the fact, that spring always initializes beans in the single-thread environment?
I never ever noticed that lifecycle-related interfaces such as InitializingBean and...