Java: Batching
Why use JDBC batching for many order-item writes?
Batching reduces repeated statement and network overhead for similar writes. When many rows are written with the same…
View Card →Quick study sessions to strengthen memory and retain key concepts.
Why use JDBC batching for many order-item writes?
Batching reduces repeated statement and network overhead for similar writes. When many rows are written with the same…
View Card →Why is it useful to returning HTTP 401/403 status codes in Spring Security?
To indicate unauthorized and forbidden access, isolating security issues from business logic. HTTP status codes 401 (Unauthorized) and…
View Card →How does the design of a Spring Security Filter Chain enable efficient security enforcement?
By isolating security tasks into distinct filters that process requests in sequence. The Filter Chain architecture allows each…
View Card →How would you explain a common pitfall when using SQL queries in Java, and how can it be avoided in an interview?
Using concatenated strings for SQL queries; use prepared statements instead. SQL Injection is a vulnerability that allows attackers…
View Card →What is HTML encoding and why is it important in preventing Stored XSS?
HTML encoding converts special characters to HTML entities, preventing script execution. Stored XSS occurs when an attacker stores…
View Card →How does increasing the BCrypt work factor enhance password security?
By making the hashing process more computationally intensive. The BCrypt work factor determines the number of iterations for…
View Card →Why is using stateless JWT tokens beneficial in Spring Security?
It allows for scalable authentication while reducing server-side session management. Stateless JWT tokens contain user authentication information and…
View Card →Why does the Spring Security CSRF filter matter in this design?
The CSRF filter prevents cross-site request forgery attacks. Cross-Site Request Forgery (CSRF) attacks trick users into submitting malicious…
View Card →How does the Spring Security Filter Chain protect your application from unauthorized access?
By intercepting and examining HTTP requests before they reach the business logic. The Spring Security Filter Chain acts…
View Card →How do CSRF tokens defend against CSRF attacks?
They verify the legitimacy of requests by matching tokens. CSRF tokens are unique and user-specific, included in each…
View Card →