{"id":25468120,"url":"https://github.com/deepsalunkhee/exploring-java-centric-stack","last_synced_at":"2026-01-25T21:17:01.831Z","repository":{"id":266476048,"uuid":"898449110","full_name":"deepsalunkhee/Exploring-Java-centric-Stack","owner":"deepsalunkhee","description":"In this repo there are some small project that I have built , while exporing Java centric stack","archived":false,"fork":false,"pushed_at":"2024-12-23T16:55:53.000Z","size":629,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-23T17:41:40.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepsalunkhee.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-04T12:16:40.000Z","updated_at":"2024-12-23T16:55:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"1239478f-0188-4ede-96cc-82b8997a0317","html_url":"https://github.com/deepsalunkhee/Exploring-Java-centric-Stack","commit_stats":null,"previous_names":["deepsalunkhee/exploring-java-centric-stack"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsalunkhee%2FExploring-Java-centric-Stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsalunkhee%2FExploring-Java-centric-Stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsalunkhee%2FExploring-Java-centric-Stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepsalunkhee%2FExploring-Java-centric-Stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepsalunkhee","download_url":"https://codeload.github.com/deepsalunkhee/Exploring-Java-centric-Stack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239430780,"owners_count":19637547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-18T07:38:35.251Z","updated_at":"2025-11-04T09:30:31.422Z","avatar_url":"https://github.com/deepsalunkhee.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is Spring Frmaework?\n\n- Spring is a powerful lightweight application development framework used for Enterprise Java (JEE).\n- Spring is an open source framework created to address the complexity of enterprise application development.\n- One of the chief advantages of the Spring framework is its layered architecture, which allows you to be selective about which of its components you use while also providing a cohesive framework for J2EE application development.\n\n\n## Prerequisites and tools required for spring.\n\n- First of all you need to have a good understanding of Java programming language.\n- You need to have a good understanding of Java EE technologies like Servlets, JSP, and EJB.\n- You need to have a good understanding of Java Database connectivity (JDBC).\n- You need to have a good understanding of Java EE application servers like Tomcat, JBoss, WebSphere, and WebLogic.\n- You need to have a good understanding of Integrated Development Environment (IDE) like Eclipse, NetBeans, and IntelliJ IDEA.\n- You need to have a good understanding of build tools like Ant  ,Maven and Gradle.\n- You need to have a good understanding of version control systems like Git, SVN, and CVS.\n- Hibernate ORM framework, JPA, and JTA.\n- (These things are enough for now and lets get started with them)\n\n### What is Servlets, JSP, and EJB?\n\n- Servlets are Java classes that are used to extend the capabilities of servers that host applications accessed by means of a request-response programming model.\n- JSP (JavaServer Pages) is a technology that helps software developers create dynamically generated web pages based on HTML, XML, or other document types.\n- EJB (Enterprise JavaBeans) is a server-side software component that encapsulates the business logic of an application.\n\n### What is JDBC?\n\n- JDBC (Java Database Connectivity) is a Java API that is used to connect and execute query to the database.\n\n### What is Java EE application servers?\n\n- Java EE application servers are a type of middleware software that hosts Java applications (including servlets, JSP, and EJB) and provides various services in a distributed multi-tier application environment.\n- Some of the popular Java EE application servers are Tomcat, JBoss, WebSphere, and WebLogic.\n\n### What are Build tools?\n\n- Build tools are software tools that are used to automate the process of compiling source code into binary code, packaging binary code, and deploying binary code to a server.\n- Some of the popular build tools are Ant, Maven, and Gradle.\n- Before these tools, developers used to compile and package the code manually.\n\n## What is IOC and DI in Spring?\n\n- IOC (Inversion of Control) is a design principle in which the control of object creation and lifecycle is transferred to a container or framework.\n- DI (Dependency Injection) is a design pattern in which an object's dependencies are injected into the object by an external entity (like a container or framework).\n\n## What is Spring Boot?\n\n- Spring Boot is a project that is built on the top of the Spring framework. It provides a simpler and faster way to set up, configure, and run both simple and web-based applications.\n- Spring Boot is a microservices-based framework and making it easy to create stand-alone, production-grade Spring-based Applications that you can \"just run\".\n\n## Dependency Injection in Spring Boot\n\n- Dependency Injection is a design pattern in which an object's dependencies are injected into the object by an external entity (like a container or framework).\n- Spring Boot uses DI to manage the components that make up an application.\n- Normally while uisng normal Java we create objects using the new keyword, which are created in JVM itself. But in Spring Boot, we create objects using the Spring container, which is responsible for managing the lifecycle of the objects.\n- The Spring container uses DI to inject the dependencies of an object into the object itself.\n- The Spring container uses annotations like @Autowired, @Component, @Service, @Repository, and @Controller to manage the components of an application.\n\n### Types of Dependency Injection in Spring Boot\n\n- There are two types of Dependency Injection in Spring Boot:\n  - Constructor-based DI\n  - Setter-based DI\n\n### Constructor-based DI \n\n- In Constructor-based DI, the dependencies of an object are injected into the object's constructor.\n- The Spring container uses the constructor to create an object and inject the dependencies into the object.\n- The Spring container uses the @Autowired annotation to inject the dependencies into the object's constructor.\n\n### Setter-based DI     \n\n- In Setter-based DI, the dependencies of an object are injected into the object's setter methods.\n- The Spring container uses the setter methods to create an object and inject the dependencies into the object.\n- The Spring container uses the @Autowired annotation to inject the dependencies into the object's setter methods.\n\n\n\n## Front controler?\n\n![frontController](./readmeImages/1.png)\n\n- This is some one who know which request to send to which controller as we may have multiple controller in a file\n- some exaples of controlers\n\n- a Baic hello world controller\n```java\n@RestController//this tell spring that this is a rest controller\npublic class HelloWorldController {\n    @RequestMapping(\"/\")//mapping to a particular end points\n    public String sayHello() {\n        return \"Hello, World!\";\n    }\n}\n```\n- If you remove \"rest\" from the restcontroller it will try to find a file named hello world in the templates folder and return the html file(like the old days)\n\n\n\n\n\n## What is Spring Boot MVC?\n\n\n### Note: The MVC video was great but too many things to procees so I guess I will go in detail as I go forward not point in sitting here\n- Spring Boot MVC is a model-view-controller (MVC) framework that is built on the top of the Spring framework.\n- Spring Boot MVC is used to develop web-based applications.\n- Spring Boot MVC provides a way to separate the business logic, presentation logic, and navigation logic of an application.\n- Spring Boot MVC uses the @Controller annotation to create a controller class, which is responsible for handling the HTTP requests and responses of an application.\n- Spring Boot MVC uses the @RequestMapping annotation to map the HTTP requests to the methods of a controller class.\n- Spring Boot MVC uses the @ResponseBody annotation to return the response of an HTTP request in JSON or XML format.\n- Spring Boot MVC uses the @PathVariable annotation to extract the values of the URI template variables from the URI of an HTTP request.\n- Spring Boot MVC uses the @RequestParam annotation to extract the values of the query parameters from the URI of an HTTP request.\n- Spring Boot MVC uses the @ModelAttribute annotation to bind the form data to the model object of an application.\n- Spring Boot MVC uses the @Valid annotation to validate the form data of an application.\n- Spring Boot MVC uses the @ExceptionHandler annotation to handle the exceptions that occur during the execution of an application.\n- Spring Boot MVC uses the @ControllerAdvice annotation to create a global exception handler for an application.\n- Spring Boot MVC uses the @RestController annotation to create a RESTful web service in an application.\n\n### Some points about MVC\n\n- MVC stands for Model-View-Controller.\n- Model: It represents the data of an application its like schima of the data\n- its a package that contains the classes that are used to store the data of an application.\n- Controller: It represents the business logic of an application,but normaly we use service layer to do this i.e logic part and controller to handle the request and response\n- its a package that contains the classes that are used to handle the HTTP requests and responses of an application.\n- View: It represents the presentation logic of an application\n\n\n## Get and Post request\n\n- Get request is used to get the data from the server(Baisc stuff)\n- Post request is used to send the data to the server(Baisc stuff)\n\nexamples:\n\n- Get request\n```java\n@GetMapping(\"/hello\")//this is a get request\npublic String sayHello() {\n    return \"Hello, World!\";\n}\n```\n\n- Post request\n```java\n@PostMapping(\"/hello\")//this is a post request\npublic String sayHello() {\n    return \"Hello, World!\";\n}\n```\n\n- get request for a particular id\n```java\n@GetMapping(\"/hello/{id}\")//this is a get request\npublic String sayHello(@PathVariable int id) {\n    return \"Hello, World!\";\n}\n```\n\n- similar stuff for put and delete request\n\n\n## What is Spring Boot Data JPA?\n\n- Spring Boot Data JPA is a project that is built on the top of the Spring framework.\n- Spring Boot Data JPA is used to develop data access layer of an application.\n- Spring Boot Data JPA provides a way to interact with the database of an application.\n- Hibernate ORM is one of the popular implementations of the JPA specification.\n- ORM stands for Object-Relational Mapping like we have mongoose in nodejs for mongodb\n\n## What is H2?\n\n- H2 is an in-memory database that is used to develop and test the data access layer of an application.\n- H2 is a lightweight database that is written in Java.\n- H2 provides a web-based console to interact with the database of an application.\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepsalunkhee%2Fexploring-java-centric-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepsalunkhee%2Fexploring-java-centric-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepsalunkhee%2Fexploring-java-centric-stack/lists"}