Spent 10 minutes wondering why my Spring Boot app wasn't picking up my application.yml values. The config looked fine: server: port: 8081 But the app kept starting on 8080. The problem: My application.yml was in src/main/resources but I also had an application-properties file in the same folder. Spring Boot loads both. Properties file wins. The fix: Delete the duplicate or merge them. Don't mix both unless you know the load order. Spring Boot priority: properties file > yml file Small overlap. Silent failure. Easy to miss. #SpringBoot #Java #BackendDevelopment #Programming
Spring Boot loads properties file over yml file
More Relevant Posts
-
Spent 20 minutes wondering why my Spring Boot app was starting slow. Checked everything. Database connections. External APIs. Nothing obvious. Then I found this: @SpringBootApplication @ComponentScan(basePackages = "com") Scanning "com" means Spring scans every package starting with com. Including third party libraries. The fix: @SpringBootApplication @ComponentScan(basePackages = "com.myapp") Be specific. Only scan your packages. Startup time dropped from 45 seconds to 12 seconds. Small change. Big difference. #SpringBoot #Java #Performance #BackendDevelopment #Programming
To view or add a comment, sign in
-
A Spring Boot mistake that silently kills your app performance. Not closing database connections properly. I worked on an app that kept crashing randomly in production. Memory usage would spike. Response times would double. Then the whole thing would freeze. We checked everywhere. Code looked fine. No obvious memory leaks. The problem? We were opening database connections but not releasing them back to the pool. Each request grabbed a connection and never let go. The fix was simple. Use try-with-resources. Let Spring manage the connection lifecycle. Stop manually opening connections without closing them. After the fix, memory usage dropped 40%. No more random crashes. The code looked fine. The logs showed nothing. But the connection pool was slowly choking the entire application. If your Spring Boot app slows down over time and restarts fix it temporarily, check your connection management first. What's a silent performance killer you've found in production? #SpringBoot #Java #Backend #Programming #SoftwareEngineering
To view or add a comment, sign in
-
🦀 Rust - Simple Explanation Rust is a modern programming language designed for performance and safety ⚡. It is mainly used for system-level programming, where speed and memory control are very important In simple words, Rust helps developers build fast programs without common errors like crashes or memory issues . https://lnkd.in/eKntSdXY follow us on our Facebook page What Rust does: Builds fast and efficient software Prevents memory errors and bugs Works close to system hardware Creates high-performance applications Examples: 🌐 Web browsers (like parts of Firefox) Game engines Operating systems Cloud services Key Features of Rust: 🛡️ Memory safety without garbage collection Very fast performance (like C++) Concurrency support (safe multitasking) Strong package manager (Cargo) Why use Rust: 🚀 High speed and performance Safer code with fewer crashes Great for system and backend development 📈 Growing popularity in tech industry #rust #rustic #RusticCharm #rusticstyle #RusticDecor
To view or add a comment, sign in
-
-
⚙️ Phase 2: What’s Inside a Spring Boot App? When you add spring-boot-starter-web, something interesting happens… You’re not just getting libraries. You’re getting: ✔️ A web server ✔️ Servlet container ✔️ Auto-configuration ✔️ Production-ready defaults By default, Spring Boot includes an embedded server. That means: 👉 No need to install anything manually 👉 Your app becomes self-contained Even better: You can switch servers easily by changing dependencies. Your app is no longer tied to a single runtime environment. 💡 This abstraction is what makes Spring Boot flexible and production-friendly. Next post: What actually happens when you run your Spring Boot app? #SpringBoot #Java #BackendDevelopment #SoftwareEngineering #SystemDesign #WebDevelopment #Programming #Developers #SpringFramework #Microservices #JavaBackend #TechDeepDive #APIDevelopment
To view or add a comment, sign in
-
Creating your own Kotlin compiler plugin sounds complex, but where do you actually start? This story answers that with a concrete first step: a working plugin that logs every class during compilation (full source code provided) 👉 Read the full story here: https://lnkd.in/ejEQDBgW #Kotlin #Compiler #Gradle #AndroidDev #KMP #SoftwareEngineering #BuildTools #Tech
To view or add a comment, sign in
-
Your API is slow. But your code looks fine. Common Spring Boot issue: N+1 queries. 1 query for parent • N queries for children Suddenly: • More DB calls • Higher latency • Poor performance Fix: • Use JOIN FETCH • Use DTO projections • Monitor queries Spring Boot didn’t slow your app. Your data access did. #SpringBoot #Java #Performance #Backend #SystemDesign #Debugging
To view or add a comment, sign in
-
-
Spent 20 minutes wondering why my Spring Boot app was not reading environment variables The code looked fine @Value("${DATABASE_URL}") private String dbUrl; application properties had nothing wrong But dbUrl was always null The problem was I set the environment variable after starting the IDE IntelliJ caches environment variables at startup so it never picked up the new one The fix was just restarting IntelliJ One restart and everything worked Spring Boot reads environment variables correctly but your IDE might not refresh them automatically What simple issue has wasted your time lately #Java #SpringBoot #Debugging #BackendDevelopment #IntelliJ
To view or add a comment, sign in
-
🚀 Kotlin 2.4.0-Beta2 is here! 🧠 Language & Compiler • Introduction of Companion Extensions with full support across analysis, resolution, IR, and metadata • New JVM bytecode target (26) • Improved type diagnostics, nullability handling, and overall compiler stability 🌍 Multiplatform & Native • Incremental compilation for Wasm enabled by default • Major improvements in Swift export (better support for Flow, generics, and coroutines) • Ongoing fixes for memory management and concurrency in Kotlin/Native 🛠 Tooling & Ecosystem • Gradle 9.4 compatibility • Enhancements to the Build Tools API and diagnostics • Continued investment in Analysis API and testing infrastructure 🐛 Stability A large number of fixes across JVM, JS, Native, Reflection, and Compose compiler—making the platform more reliable across the board. 🔗 https://lnkd.in/d3K95nmd #Kotlin #KotlinMultiplatform #AndroidDev #Android #AndroidDevelopment #JVM #WebAssembly #Swift #SoftwareDevelopment #Programming
To view or add a comment, sign in
-
Most beginners use Spring Boot… but don’t really understand how it works. Here’s the simple breakdown, When you run a Spring Boot app: • It starts an embedded server (Tomcat by default) • Scans your project for components (@Controller, @Service, etc.) • Automatically configures things using AutoConfiguration That’s the magic — you don’t write boilerplate configs. 💡 Example: Instead of manually setting up a server, Spring Boot does it for you. Why this matters: If you don’t understand this, debugging becomes painful later. I’m currently diving deeper into how Spring Boot simplifies backend development — and honestly, it's powerful when used right. #SpringBoot #Java #BackendDevelopment
To view or add a comment, sign in
-
-
Today, I came across one of the rarest of the rarest scenarios of a programmer's life. An algorithm problem in a production app... The problem was to find the index of the first unread message from a list of messages provided by the backend to the Android frontend app written in Kotlin. The unread messages are stored at the end of the list. As the list of messages in a single session is usually very short, the obvious solution is to use a linear search and stop at the index of the first unread message. However, I took it as a challenge and coded a simple binary search algorithm that gets the job done in O(log n) time. (P.S. I will still be using a simple Linear Search. Oftentimes, the better choice is to let your code be more readable and more approachable, rather than saving 0.5 ms in a single session) #leetcode #programming #softwareengineering #android #androiddevelopment #kotlin #java #androidstudio
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Same thing happens with profile-specific configs. If you have application-dev.yml and application-dev . properties, properties wins again. Keep configs in one format to avoid surprises.