{"id":17674230,"url":"https://github.com/codewithrajdeep/java-webservice","last_synced_at":"2026-02-16T19:36:45.756Z","repository":{"id":258240528,"uuid":"873602464","full_name":"CodewithRajDeep/Java-webservice","owner":"CodewithRajDeep","description":"java webservice implementation using SpringBoot ","archived":false,"fork":false,"pushed_at":"2024-12-08T03:37:29.000Z","size":1813,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T02:51:41.488Z","etag":null,"topics":["eclipse-ide","java-8","springboot"],"latest_commit_sha":null,"homepage":"","language":"Java","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/CodewithRajDeep.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,"zenodo":null}},"created_at":"2024-10-16T12:50:47.000Z","updated_at":"2024-12-08T03:37:32.000Z","dependencies_parsed_at":"2024-12-08T04:20:42.137Z","dependency_job_id":"ae730650-2e76-4367-a14a-1dd020e25561","html_url":"https://github.com/CodewithRajDeep/Java-webservice","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"ba0ba24ea8c1b1a85cdb3900824c7caa50b2ef7d"},"previous_names":["codewithrajdeep/java-webservice"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodewithRajDeep/Java-webservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodewithRajDeep%2FJava-webservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodewithRajDeep%2FJava-webservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodewithRajDeep%2FJava-webservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodewithRajDeep%2FJava-webservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodewithRajDeep","download_url":"https://codeload.github.com/CodewithRajDeep/Java-webservice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodewithRajDeep%2FJava-webservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275899862,"owners_count":25548993,"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","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["eclipse-ide","java-8","springboot"],"created_at":"2024-10-24T07:06:14.035Z","updated_at":"2025-09-19T07:41:33.169Z","avatar_url":"https://github.com/CodewithRajDeep.png","language":"Java","readme":"## Title: Java webservice \n\n## \u003ca name=\"description\"\u003eDescription\u003c/a\u003e\nThis project is a simple, scalable, and efficient Java-based RESTful web service built using Spring Boot and Spring.io frameworks. The primary objective of this service is to handle HTTP requests, process business logic, and return appropriate responses using REST API endpoints. The project is designed to demonstrate the best practices of RESTful service architecture and can be extended for a wide range of use cases, such as user management, e-commerce services, or microservice architecture.\n\n  \u003cdiv\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Eclipse-2C2255?style=for-the-badge\u0026logo=eclipse\u0026logoColor=white\" alt=\"eclipse\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Java-ED8B00?style=for-the-badge\u0026logo=openjdk\u0026logoColor=white\" alt=\"java\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Markdown-000000?style=for-the-badge\u0026logo=markdown\u0026logoColor=white\" alt=\"markdown\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white\" alt=\"mongodb\" /\u003e\n  \u003c/div\u003e\n\n\n\n## 📋 \u003ca name=\"table\"\u003eTable of Contents\u003c/a\u003e\n\n1. 🤖 [Introduction](#description)\n2. ⚙️ [Tech Stack](#tech-stack)\n3. 🔋 [Features](#features)\n4. 🤸 [Quick Start](#quick-start)\n5. 🕸️ [Setup .env variables](#snippet)\n6. ❄️ [Deployment](#deployment)\n\n\n\n## \u003ca name=\"tech-stack\"\u003e⚙️ Tech Stack\u003c/a\u003e\n\n- SpringBoot\n- Spring Web\n- MySQL\n- Maven\n- Postman\n- Java\n- Pom.xml validation\n\n\n## \u003ca name=\"features\"\u003e🔋 Features\u003c/a\u003e\n\n👉 **RESTful Endpoints** : Implements GET, POST, PUT, DELETE operations with standard REST conventions.\n\n👉 **Service Layer** : Business logic is separated from controllers using the service layer.\n👉 **Dependency Injection** : Utilizes Spring’s dependency injection to manage application components.\n👉 **Exception Handling** : Global exception handling using @ControllerAdvice to manage error responses.\n👉 **Database Integration**  (optional): Can interact with a relational database using Spring Data JPA and Hibernate ORM for persistence.\n👉 **Modular and Scalable** : Can easily integrate additional Spring components like Spring Security, Spring Cloud, Spring Batch, or third-party services for more advanced functionality.\n\n\n## \u003ca name=\"quick-start\"\u003e🤸 Getting Started \u003c/a\u003e\n\n1. **Clone the repository:**\n   ```\n   git clone [https://github.com/CodewithRajDeep/Java-webservice.git]\n   ```\n2. **Install all dependcies**\n    ```\n    cd your-project\n    mvn clean install\n    mvn spring-boot:run\n    \n    ```\n3. **plugins installation**\n     ```\n      sprinboot.io\n      apache tomact server v10.0\n      springweb\n      maven dependencies \n     ```\n 4. By default, the service runs at[http://localhost:8080) with your  browser to see the result.\n\n## Prerequisites:\n \n   Make sure you have the following installed on your machine:\n\n   - [Git](https://git-scm.com/)\n   - [SpringBoot](https://spring.io/projects/spring-boot)\n   - [Apache Tomcat server](https://tomcat.apache.org/tomcat-9.0-doc/config/index.html) (Server Manager)\n\n ## \u003ca name=\"snippet\"\u003e Setup Environment Variable\u003c/a\u003e\n Create a Spring Boot project using Spring Initializr:\n1. Set up Spring Boot Project\n     You can create a Spring Boot project using Spring Initializr:\n   ```\n   Visit start.spring.io.\n   Choose the following options:\n   Project: Maven Project\n   Language: Java\n   Spring Boot: (select latest stable version)\n   Dependencies: Add the following:\n    Spring Web\n    Spring Boot DevTools (optional, for easier development)\n    Lombok (optional, for reducing boilerplate code)\n    Spring Data JPA (optional, if you need to use a database)\n    H2 Database or MySQL Driver (if database integration is needed)\n    Generate and download the project.\n   ```\nUnzip the downloaded project and open it in your favorite IDE (e.g., IntelliJ IDEA, Eclipse).\n2. Create a REST Controller\n```\n\u003cdivide\u003e  \n \u003csummary\u003e\u003ccode\u003eREST Controller\u003c/code\u003e\u003c/summary\u003e\npackage com.example.demo.controller;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\npublic class HelloController {\n\n    @GetMapping(\"/hello/{name}\")\n    public String sayHello(@PathVariable String name) {\n        return \"Hello, \" + name;\n      }\n    }\n\u003c/divide\u003e\n```\n\n3. Run the Application: Once you have the basic structure in place, you can run the application:\n Using your IDE: Right-click on the main application class (annotated with @SpringBootApplication) and select Run.\n Using Maven: Open a terminal in your project folder and run:\n ```bash\nCopy code\nmvn spring-boot:run\nThe application will start up on port 8080 by default.\n\nYou can access your REST service by navigating to:\n\nbash\nCopy code\nhttp://localhost:8080/hello/{name}\n```\n4. Create a service layer\n```\n   \u003cdivide\u003e\n   \u003csection name=\"webservice\"\u003e\n     package com.example.demo.controller;\n\nimport com.example.demo.service.GreetingService;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\npublic class HelloController {\n\n    @Autowired\n    private GreetingService greetingService;\n\n    @GetMapping(\"/hello/{name}\")\n    public String sayHello(@PathVariable String name) {\n        return greetingService.getGreeting(name);\n    }\n}\n   \u003c/section\u003e\n\u003c/divide\u003e\n```\n5. Test your web service\n  ```\n   \u003cdivide\u003e\n   \u003csection name=\"test web service\"\u003e\n   package com.example.demo;\n\nimport com.example.demo.controller.HelloController;\nimport org.junit.jupiter.api.Test;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.test.web.servlet.MockMvc;\n\nimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;\nimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;\nimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;\n\n@SpringBootTest\n@AutoConfigureMockMvc\nclass HelloControllerTest {\n\n    @Autowired\n    private MockMvc mockMvc;\n\n    @Test\n    void sayHelloTest() throws Exception {\n        mockMvc.perform(get(\"/hello/John\"))\n                .andExpect(status().isOk())\n                .andExpect(content().string(\"Hello, John\"));\n    }\n}\n\n   \u003c/section\u003e\n   \u003c/divide\u003e\n   ```\n6. Dependencies\n   ```\n   add in pom.xml\n   \u003cdivide\u003e\n   \u003csection\u003e\n   \u003cdependency\u003e\n    \u003cgroupId\u003eio.springfox\u003c/groupId\u003e\n    \u003cartifactId\u003espringfox-boot-starter\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n   \u003c/section\u003e\n   \u003c/divide\u003e\n   ```\n## Contribution Guidelines: \nGuidelines for contributing to the project.\n\n**Reporting Issues:**\n\nSearch for existing issues: Before creating a new issue, search the issue tracker to see if the problem has already been reported.\nProvide clear and concise information: When creating a new issue, please include as much detail as possible, such as:\nClear description of the problem\nSteps to reproduce the issue\nExpected behavior\nActual behavior\nScreenshots or logs (if applicable)\nUse issue templates: If available, use the provided issue templates to structure your report.\n\n**Submitting Pull Requests:**\n\nFork the repository: Create a fork of the project on your GitHub account.\nCreate a new branch: Create a new branch based on the main branch or a feature branch.\nMake changes: Implement your changes and commit them with clear commit messages.\nPush changes to your fork: Push your changes to your forked repository.\nOpen a Pull Request: Create a pull request from your branch to the main repository.\nProvide details: Clearly describe the changes you've made and the benefits they bring.\nAddress code review feedback: Be open to feedback and make necessary changes.\n\n**Testing:**\n\nWrite unit tests for any new features or bug fixes.\nEnsure existing tests  pass after your changes.\n\n## License\nIssued : Copyright (c)| 2024 Deep Raj \n\n## Memes: \n\u003cimg src=\"https://i.gifer.com/origin/ea/ea04580a05ae61739fefe6b70f17a4c3.gif\" width=\"256\" height=\"256\"/\u003e\n\u003cimg src=\"https://i0.wp.com/www.animefeminist.com/wp-content/uploads/2018/06/type-happy-dog-motivate.gif?fit=309%2C233\u0026ssl=1\" width=\"256\" height=\"256\"/\u003e\n\u003cimg src=\"https://i0.wp.com/www.animefeminist.com/wp-content/uploads/2018/06/pitch-baseball-explode-nichijou.gif?resize=500%2C281\u0026ssl=1\" width=\"256\" height=\"256\"/\u003e\n\n \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithrajdeep%2Fjava-webservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithrajdeep%2Fjava-webservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithrajdeep%2Fjava-webservice/lists"}