
👨💻 Passionate Programmer | 🚀 Sharing Coding Tips & Tech Insights | 📚 Informative Posts for Tech Enthusiasts #Programming #TechTips
india
Joined August 2023
- Tweets671
- Following183
- Followers151
- Likes371
Nitish Sahni retweeted
Java 22 introduced the following features:
Unnamed Variables & Patterns - cleaner and faster prototypes
String Templates (Preview) - finally, better and safer string interpolation
Scoped Values (Incubator) - a modern alternative to ThreadLocal
Java keeps on evolving...
Java 22 introduced the following features:
Unnamed Variables & Patterns - cleaner and faster prototypes
String Templates (Preview) - finally, better and safer string interpolation
Scoped Values (Incubator) - a modern alternative to ThreadLocal
Java keeps on evolving...
Nitish Sahni retweeted
Use @ CrossOrigin to enable CORS in your REST APIs! ✨
Essential for frontend-backend communication!
Use @ BatchSize to optimize lazy loading collections!
@ BatchSize(size = 10)
private List<Order> orders;
Reduces queries & improves performance when loading related entities.
#Hibernate #Java #JPA #PerformanceTips
25
* Use @DynamicUpdate to update only changed columns! *
@DynamicUpdate
@Entity
public class User { ... }
Reduces unnecessary SQL, improves performance.
24
Nitish Sahni retweeted
Use spring-boot-devtools for auto-restart & live reload during development! ✨
Add to pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
Boost dev speed!
Use spring-boot-devtools for auto-restart & live reload during development! ✨
Add to pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
Boost dev speed!
Nitish Sahni retweeted
Spring Boot Tip:
Use @SpringBootTest for integration testing your full app context.
Need faster unit tests? Use @WebMvcTest or @DataJpaTest to load only slices!
Smarter testing = faster feedback!
Spring Boot Tip:
Use @SpringBootTest for integration testing your full app context.
Need faster unit tests? Use @WebMvcTest or @DataJpaTest to load only slices!
Smarter testing = faster feedback!
Switch expressions are more powerful in Java 14+!
String result = switch(day) {
case MONDAY -> "Start";
case FRIDAY -> "End";
default -> "Mid";
};
More concise, less error-prone!
#Java
46
Avoid N+1 query issues using JOIN FETCH!
SELECT a FROM Author a JOIN FETCH a.books
Loads authors with books in a single query — boost performance!
#Hibernate #JPA #Java #PerformanceTips
352
Nitish Sahni retweeted
Use @RestControllerAdvice to handle exceptions globally! ✨
Cleaner APIs, better UX!
#SpringBoot #Java #API3
Use @RestControllerAdvice to handle exceptions globally! ✨
Cleaner APIs, better UX!
#SpringBoot #Java #API3
Nitish Sahni retweeted
Run your website for under $12 a year!
Domain
- Cloudflare
FREE Static Site Hosting
- Sevalla
- Netlify
- Vercel
- GitHub Pages
- Render
- Firebase
- Cloudflare Pages
FREE Database
- Supabase
- Appwrite
- Mongo Atlas
- Hasura
- Neon
FREE Backend
- Netlify Functions
- Vercel
- Google Functions
- Render
- Cloudflare Workers
- AWS Lambda
- Appwrite
- Cyclic .sh
- Glitch



