java


Spring #PreAuthorize is not working on PATCH request


In the following code I want to update the rider , Query works fine but I also want to check the authority of logged-In user but following code is not working
In the First query completeOrder #PreAuthorized annotation works but inthe second query it does not work
public interface OrderRepository extends JpaRepository<Order, Long> {
#PreAuthorize("hasAuthority('rights')")
#Query("Select o from Order o where o.orderStatus='DELIVERED'")
List<Order> completedOrder();
#PreAuthorize("hasAuthority('rights')")
#Modifying
#Query("Update Order o set o.rider=:riderId where o.id= :orderId")
List<Order> changeRider();
}
My Problem is solved now, mistake is not in my code , actually I am sending different API call and check this API :| My bad

Related Links

IntelliJ IDE does not detect Scala templates properly
Struts 2 : Displays table of Songs - null gets printed
upload csv file containing million values to a particular column in mysql
MovableObject java syntax error
Deferred Result in Spring MVC returning incorrect response
Using google static maps - JFrame or Javascript
How to put a button texture on another texture?
In Java, can you use negative one with substring? [closed]
Resizing image with libgdx
Libgdx serialization
ArrayOutOfBounds exception when trying to parse Double to String
Can methods be referred to as functions in comments [closed]
Positioning button on the TableActivity from the code
Infinispan Clustering applications on 2 servers
How to use a random array number and a timer in java?
How can I write a method to intersperse two arrays of different lengths?

Categories

HOME
yii2
sd-card
razor
callback
uber-api
virtualization
python-unittest
ssl-client-authentication
volttron
dax
zebra-printers
seaborn
reactive-cocoa
oracle-coherence
reverse-proxy
functional-testing
ehcache
pepper
selectedindexchanged
virtualdub
nhapi
elasticsearch-ruby
assistant
atlassian-crucible
subdomains
nouislider
exuberant-ctags
catel
winrt-xaml-toolkit
framemaker
asset-pipeline
jmonkeyengine
retina-display
starteam
greenrobot-eventbus
sas-visual-analytics
preconditions
g-code
turbogears
import-from-excel
flashair
executenonquery
wso2carbon
scrollable
hibernate-tools
dropbox-php
mu
jxcore
lync-client-sdk
specrun
file-writing
intrusion-detection
pickadate
php-internals
goose
two-factor-authentication
ford-fulkerson
separator
xna-4.0
kcachegrind
browser-bugs
map-projections
myo
javax.mail
tween
gwidgets
gui-test-framework
markers
rdl
php-5.4
heisenbug
dml
valuechangelistener
java.nio.file
page-layout
farseer
google-cloud-save
jquery-mobile-dialog
flashvars
libstdc++
word-processor
online-compilation
fireworks
window-management
django-tagging
servicehost
yui-datatable
krl
telerik-scheduler
jquery-ui-droppable
modelstate
audio-capture
sector
mediarss
data-acquisition
.net-1.0

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App