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

Usage of ArrayLists for JSwing components
Observable.zip with Observable.timer
JGit: Use TreeWalk to get content of file
sync one sqlite DataBase with another sqlite DataBase in C# or JAVA [closed]
How do I correctly handle errors like these in SQLite/Java/Android?
Gradle: Exclude/Include test classes that extend a specific class
JavaFX - set size of points in scatter chart in units of axis
XLSM Cell defaults to White background only where Data is Present
Jackson exception when executing CYPHER delete query with neo4j-ogm 2.0.x
Can't input accentuated characters in JPasswordField on Ubuntu
Synchronize on the same lock
Parse date-only value in ISO 8601 format in java.time (YYYY-MM-DD)
Android - Write location to file
java error: Class names, 'server1' are only accepted if annotation processing is explicitly reqested
Calculating sin(x) w/oMath and using loops only in java
How to increase overall Primefaces size components

Categories

HOME
jdo
vbscript
activiti
fluentd
jgroups
dxl
webpack-2
session-variables
visual-studio-cordova
libtiff
visjs
graphicsmagick
sox
excel-2007
tibco-mdm
blazemeter
firebase-crash-reporting
tooltipster
fifo
neo4j-spatial
xacml
msys2
libssl
gsmcomm
lightswitch-2013
kendo-ui-grid
protovis
uiswipegesturerecognizer
mpmediaquery
jmonkeyengine
overlap
withings
occlusion
eclipse-scout
arena-simulation
modelmapper
qcombobox
dandelion
typescript1.8
sage-one
powercli
git-diff
sqlbulkcopy
epson
redundancy
specrun
pycaffe
home-directory
prettytensor
hill-climbing
jfugue
retina
embedded-code
deis
interrupted-exception
coldbox
winddk
rdtsc
socketexception
hyprlinkr
concurrent-collections
html5-notifications
pyhdf
multiprocessor
ruby-datamapper
back-stack
e4x
venn-diagram
parametric-equations
transactionscope
boost-filesystem
data-loss
vdsp
xmemcached
html-input
gamequery
nhibernate.search
database-management
webkit.net
boost-smart-ptr
procedural-music

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