Giter Club home page Giter Club logo

spring-boot-custom-json-response's Introduction

spring-boot-jsonresponse

This is a dummy Spring Boot 2.3.5.RELEASE application with Swagger2 to demonstrate a way to provide JSON response from server. Typically, it can be used while developing a RESTful web service.

This project has been built with Eclipse IDE Version: 2020-09 (4.17.0), Apache Ant(TM) version 1.10.9, Apache Maven 3.6.3 y Java(TM) SE Runtime Environment (build 1.8.0_271-b09)

Prerequisites

  1. Environment variable JAVA_HOME is set.
  2. Environment variable M2_HOME is set.
  3. Environment variable CLASSPATH is set and contains at least one element from JAVA_HOME and at least one element from M2_HOME.
  4. Import the project into eclipse and run the command: mvn eclipse:clean eclipse:eclipse install

Custom

This dummy use PersonDTO object if need a custom dummy you can generate plain old java objects and implement the custom components

Generate Plain Old Java Objects from JSON or JSON-Schema (http://www.jsonschema2pojo.org/)

Example: Package: com.at.spring.jsonresponse.dto Class name: CustomDTO Target language: Java Source type: JSON Annotation style: None

Test

To test, execute the command: mvn clean package

Then, execute the command: java -jar target\spring-boot-jsonresponse-1.0.jar

So, using the values of the server.servlet-path and server.port defined in the src / main / resources / application.properties file open a browser to..

http://localhost:{server.port}/{server.servlet-path}/swagger-ui.html (UI Docs)
http://localhost:{server.port}/{server.servlet-path}/v2/api-docs (JSON Docs)	

spring-boot-custom-json-response's People

Contributors

ashyboyofficial avatar

Stargazers

 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.