Add interview module: 30 design pattern interview questions with tests (Java 25, Spring 7.0.10)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7rnC7jppGGdHGESvy
This commit is contained in:
Claude
2026-10-28 18:10:09 +00:00
parent f5688a6b32
commit c51641b7db
48 changed files with 1617 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
Q24 getBean("connection") -> Connection
Q24 getBean("&connection") -> ConnectionFactoryBean
Q24 ApplicationContext is itself a BeanFactory? true
Q25 target with interface, defaults -> jdkDynamicProxy=true cglib=false
Q25 target with interface, proxyTargetClass -> jdkDynamicProxy=false cglib=true
Q25 target with no interface -> jdkDynamicProxy=false cglib=true
Q25 JDK proxy instanceof GreeterImpl? false; CGLIB proxy instanceof GreeterImpl? true
Q26 proxy.outer() returned 2; advice saw [outer] (inner() ran, but was never intercepted)
Q26 proxy.inner() called from outside; advice saw [inner]
Q26 final method on a CGLIB proxy: finalMethod() -> "name=null", advice saw []
Q27 publishEvent(OrderPlaced): listener ran on the caller's thread? true
Q28 TransactionTemplate success path: [begin, work, commit] returned done
Q28 TransactionTemplate when the callback throws: [begin, work, rollback]
Q29 Map<String, Payment> injected with keys [card, upi]
Q29 pay("upi", 500) -> upi:500
Q30 getBean(Ticket) twice from the context: same instance? false
Q30 prototype injected into a singleton: same Ticket on every call? true
Q30 prototype fetched via ObjectProvider: same Ticket on every call? false