Let's continue with our spring framework projects!
In this coding session, we delve into implementing method-level security using Spring Security's powerful @PreAuthorize annotation. Method-level security provides granular control over who can access specific methods within your Spring application, allowing for fine-grained security configurations.
For this session I created spring boot application with 2 secured rest api endpoints. You can only access the endpoint if you have the right role and your password is correct.
WHAT YOU'LL LEARN
🚀 Understanding the @PreAuthorize annotation and its usage.
🚀 Configuring method-level security in a Spring Boot application.
🚀 Testing method-level security configurations with Postman.
TIMESTAMPS
00:00 intro - Coding session 20
00:05 part 1- Spring security documentation
00:27 part 2- Testing spring rest api project (this coding example) using postman
01:13 part 3 - Code walkthrough
01.14 code - Maven dependencies
01:37 code - RestController with @PreAuthorize
02:15 code - Configuration
02:55 Review our test and code together
03:58 Questions? leave a comment
04:38 outro - more coding sessions
DON'T FORGET
to like, subscribe, and share if you find the content helpful!
/ @codingwithbibbobbib
TOOLS
Intellij IDEA Community Edition, postman
TECHNOLOGIES
Spring Framework 3.2.5, Spring Boot, Spring Security, maven, java 17 .
TIPP CODING SESSIONS
Mocking API Data with Examples In Postman: • Mocking API Data with Examples In Postman,...
STAY CONNECTED
https://bento.me/annadamer
MUSIC
licensed with Epidemic Sound
https://www.epidemicsound.com
SUSBCRIBE FOR MORE VIDEOS
/ @codingwithbibbobbib
THANK YOU
for being here, I hope you're well!
HAPPY CODING, Anna
#codingwithbibbobbib, #restapi, #springsecurity, #coding #howto, #codingsession, #springboot #springboottutorial, #bibbobbib
In questa pagina del sito puoi guardare il video online Spring Method Security with @PreAuthorize, Spring Boot Tutorial, Learn Java, Coding with BibBobBib della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Coding With BibBobBib 11 maggio 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 479 volte e gli è piaciuto 7 spettatori. Buona visione!