Posts

JAVA-INTO

 INTO OF JAVA * JAVA is a high level , object oriented programming language developed      by sun   microsystem  in 1995.   *  its philosophy is " WORA ", meaning java code runs on any device with         JVM , regardless of underlying operating system.   *  Java is maintained and updated by Oracle, with major version including      java 8,11,17,21,24.  feature :      > platform independent      > Object oriented design of reuable and maintainable code      > Strong security model      > Support multithreading for handling multiple tasks at once.      > Robutness and error handling capabilities.      >JIT compilation for performance.   uses :      > desktop and web application.      >mobile apps      >Server-side, cloud and web s...

STRUCTURE OF SPRING BOOT (Maven)

Image
 my-springboot-app/ │ ├── src/ │   └── main/ │       ├── java/ │       │   └── com/ │       │       └── example/ │       │           └── myapp/ │       │               ├── MySpringBootApplication.java  <-- Main class │       │               ├── controller/ │       │               │   └── UserController.java       <-- REST controller │       │               ├── service/ │       │               │   └── UserService.java          <-- Business logic │    ...

DAY 1 observation 16/7/25

 tools description:    language =>   java version 21 (LTS)       ide      => eclipse  Spring Boot =>    ✅ What is @RestController ?  @RestController It is a specialized version of @Controller that combines: @Controller → Marks the class as a Spring MVC controller @ResponseBody → Tells Spring to return data (like JSON/XML) instead of rendering a view 🔹 Purpose: Used for REST APIs that return data, not HTML Automatically serializes Java objects (like List , Map , or custom classes) to JSON (via Jackson) @RestController public class HelloController {     @GetMapping("/hello")     public String sayHello() {         return "Hello, World!";     } } When you access http://localhost:8080/hello , it returns: ✅ What is @GetMapping ?  @GetMapping("/endpoint") @RequestMapping(method = RequestMethod.GET, value = "/endpoint") @GetMapping("/s...

INTRO OF SPRING BOOT

 what is elastic search   Elasticsearch is a high-performance, distributed search and analytics engine built on top of Apache Lucene . It's primarily used for full-text search , log and event data analysis , and real-time analytics on large volumes of data.   what is schedular In Spring Boot , a scheduler allows you to run tasks periodically or at fixed times using the @Scheduled annotation. Spring’s scheduling support is simple, powerful, and widely used in applications like sending emails, cleaning databases, syncing data, etc.  ✅ What is Unit Testing ? Unit testing is a software testing method where individual units or components (like a function, method, or class ) are tested in isolation to ensure they work as expected. 🧠 Simple Definition: Unit testing means testing one piece of code (a "unit") by itself , usually using automated test code.