Sandesh. Gundoji

99 posts

Sandesh. Gundoji banner
Sandesh. Gundoji

Sandesh. Gundoji

@TechBySandeshG

Software Engineer @Capgemini | Passionate about Java, SpringBoot, Cloud & DevOps | Helping devs get interview-ready | Sharing practical tech & interview tips

Katılım Aralık 2025
13 Takip Edilen3 Takipçiler
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Why does “works on my machine” happen? Because .m2 cache hides dependency conflicts that CI reveals.
English
0
0
0
21
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Production issue story 👇 Wrong dependency version pulled via transitive dependency. App compiled. Runtime crashed. Solution? mvn dependency:tree
English
0
0
0
21
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Q: What are transitive dependencies? A: If A depends on B, and B depends on C, Maven automatically brings C into A. Dependency graph resolution is automatic.
English
0
0
0
9
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Q: What happens internally when you run mvn install? A: 1.Executes lifecycle up to install 2.Compiles code 3.Runs tests 4.Packages artifact 5.Stores artifact in local repo It’s a phase chain execution.
English
0
0
0
6
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Q: Why do we use mvn clean? A: It deletes the target/ directory. Prevents stale .class files from affecting the new build. Clean ensures deterministic builds.
English
0
0
0
2
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Q: What happens internally when you run mvn install? A: 1.Executes lifecycle up to install 2.Compiles code 3.Runs tests 4.Packages artifact 5.Stores artifact in local repo It’s a phase chain execution.
English
0
0
0
7
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Q: What is Super POM? A: Maven has a hidden default POM called Super POM. Your project POM inherits from it. That’s where default plugins & repos come from. #JavaInterview #Maven #BuildTools
English
0
0
0
12
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Q: Difference between mvn clean install and mvn clean package? A: package → builds JAR/WAR install → builds + copies artifact to local .m2 repo Install is for reuse by other local projects. #JavaInterview #Maven #BuildTools
English
0
0
0
15
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Spring scopes aren’t hardcoded. You can define Custom Scopes. Custom scope = Custom lifecycle + Custom storage + Custom cleanup Spring gives you the hooks. You define the rules.
English
0
0
0
35
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Spring also supports WebSocket scope 👀 Yes, it exists, most people never mention it. WebSocket scope = one bean per WebSocket session Perfect for: ✔ Live updates ✔ Chat apps ✔ Streaming data
English
0
0
0
34
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Application scope ≠ Singleton. Singleton → per ApplicationContext Application → per ServletContext Use Application scope when: ✔ Data shared across all users ✔ App-wide caches ✔ Read-heavy, rarely-changing data
English
0
0
0
21
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Session scope = one bean per HTTP session Backed by the servlet container. If you use Session scope in microservices, ask yourself: “Do I really need server-side state?” 🤔 Spring resolves scope before bean creation using metadata in BeanDefinition. Scope is a container task.
English
0
0
0
21
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Request scope = one bean per HTTP request Stored internally using RequestAttributes. Web-only. Context matters. Request scope = one bean per HTTP request Stored internally using RequestAttributes. Web-only. Context matters.
English
0
0
0
22
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Prototype scope means: Spring creates the object… and then says “Good luck 🤝” No lifecycle management after creation. Use Prototype when: ✔ Stateful ✔ Short-lived ✔ Not thread-safe And never inject it directly into Singleton without a proxy.
English
0
0
0
21
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Default Spring scope = Singleton One bean per ApplicationContext, not per JVM. Use Singleton when: ✔ Stateless ✔ Thread-safe ✔ Shared across requests 90% of Spring beans should be Singleton.
English
0
0
0
18
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Spring doesn’t eagerly create everything. It eagerly creates BeanDefinitions.
English
0
0
0
28
Sandesh. Gundoji
Sandesh. Gundoji@TechBySandeshG·
Spring resolves conflicts at BeanDefinition level, not object level. @Primary, @Qualifier? Metadata decisions. Why does @Conditional work? Because Spring decides whether to register a BeanDefinition at all. No definition → no bean.
English
1
0
0
43