Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: Spring Security Filter Chain

Front

Why does the Spring Security Filter Chain matter in this design?

It processes HTTP requests through a series of security filters. The Spring Security Filter Chain acts like a…

View Card →
Flashcard Study

Java: Spring Security Filter Chain

Front

Where should order-ownership checks live?

Near the business action, where order facts are actually available. The filter chain authenticates requests early, but resource-specific…

View Card →
Flashcard Study

Java: Spring Security Filter Chain

Front

Why are role claims often not enough?

Because ownership, workflow state, and tenant rules can matter beyond a coarse role. A token claim like `role=CUSTOMER`…

View Card →
Flashcard Study

Java: Spring Security Filter Chain

Front

Authentication vs authorization?

Authentication proves identity; authorization decides what that identity may do. A valid login or token only answers who…

View Card →
Flashcard Study

Java: Transactions and Proxies

Front

How can interface-based proxies affect design?

Require designing classes for interface implementation. Using interface-based proxies encourages designing classes to implement interfaces, which enhances flexibility…

View Card →
Flashcard Study

Java: Transactions and Proxies

Front

How does Spring decide to rollback transactions?

Spring rolls back on runtime exceptions by default. In Spring, a transaction is automatically rolled back if a…

View Card →
Flashcard Study

Java: Transactions and Proxies

Front

Why is @Transactional not working inside the same class?

The proxy is bypassed in self-invocation. Frame the concept in practical terms so you can explain it during…

View Card →
Flashcard Study

Java: Transactions and Proxies

Front

How would you explain a potential issue with CGLIB-based proxies in an interview?

CGLIB proxies require non-final classes and methods. CGLIB proxies subclass the target class to add proxy functionality, which…

View Card →
Flashcard Study

Java: Transactions and Proxies

Front

What are the trade-offs of using constructor injection?

It enforces immutability and ensures dependencies are set. Constructor injection in Spring is beneficial as it promotes immutability…

View Card →
Flashcard Study

Java: Transactions and Proxies

Front

Why does Bean scopes in Spring matter in this design?

Bean scopes define the lifecycle and visibility of beans. In Spring, bean scopes determine the lifecycle and how…

View Card →