Git Product home page Git Product logo

java_spring's Introduction

Medium Scale Project

This project is a medium-scale software application built with Java and Spring Framework. It is designed to demonstrate a simple RESTful API service that manages a collection of examples.

Requirements

  • Java 11
  • Maven
  • Spring Boot 2.7.0

Running the Application

To run the application, use the following command in the root directory of the project:

mvn spring-boot:run

The application will start and be available at http://localhost:8080.

REST API

The REST API to the example app is described below.

Get list of Examples

GET /api/examples

Get a specific Example

GET /api/examples/{id}

Create a new Example

POST /api/examples

Update an existing Example

PUT /api/examples/{id}

Delete an Example

DELETE /api/examples/{id}

H2 Database Console

The H2 database console is enabled by default and can be accessed at http://localhost:8080/h2-console.

Project Structure

The project has the following structure:

  • pom.xml: Project Object Model file for Maven build.
  • src/main/resources/application.properties: Configuration properties for the application.
  • src/main/java/com/example/YourApplication.java: Main application class that runs the Spring Boot application.
  • src/main/java/com/example/controller/ExampleController.java: REST controller for handling API requests.
  • src/main/java/com/example/service/ExampleService.java: Service layer to handle business logic.
  • src/main/java/com/example/repository/ExampleRepository.java: Repository interface for data access.
  • src/main/java/com/example/model/ExampleModel.java: Entity model representing an example.
  • src/test/java/com/example/YourApplicationTests.java: Tests for the Spring Boot application.
  • src/test/java/com/example/controller/ExampleControllerTests.java: Tests for the ExampleController.
  • src/test/java/com/example/service/ExampleServiceTests.java: Tests for the ExampleService.
  • src/test/java/com/example/repository/ExampleRepositoryTests.java: Tests for the ExampleRepository.
  • .gitignore: Specifies intentionally untracked files to ignore.
  • README.md: This file, containing project documentation.

Testing

To run the tests, use the following command:

mvn test

Contributing

If you wish to contribute to this project, please fork the repository and submit a pull request.

License

This project is open-sourced under the MIT License.

java_spring's People

Contributors

brief69 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.