Giter Site home page Giter Site logo

pradeepwebonise / spring-boot-application-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anantharajuc/spring-boot-application-template

0.0 1.0 0.0 767 KB

Spring Boot Application Template/Starter-Project

Home Page: https://anantharajuc.github.io/Spring_Boot_Starter_Template/

Java 38.69% HTML 47.07% CSS 1.01% TSQL 12.15% Dockerfile 1.08%

spring-boot-application-template's Introduction

Spring Boot Application Template/Starter-Project

FOSSA Status

The only thing better than a Maven archetype is a repo you can fork with everything already setup. Skip the documentation and just fork-and-code.

Delete the sample code, replace with your own and you’re good to go.

Built With

  • Maven - Dependency Management
  • Flyway - Version control for database
  • JDK - Java™ Platform, Standard Edition Development Kit
  • Spring Boot - Framework to ease the bootstrapping and development of new Spring Applications
  • MySQL - Open-Source Relational Database Management System
  • git - Free and Open-Source distributed version control system
  • Thymeleaf - Modern server-side Java template engine for both web and standalone environments.
  • Prometheus - Monitoring system and time series database
  • Lombok - Never write another getter or equals method again, with one annotation your class has a fully featured builder, Automate your logging variables, and much more.
  • Swagger - Open-Source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful Web services.

External Tools Used

  • Postman - API Development Environment (Testing Docmentation)

To-Do

  • Logger (Console, File, Mail)
  • RESTful Web Service (CRUD)
  • Bootstrap - CSS
  • Web - HTML, JavaScript (jQuery)
  • Content Negotiation
  • Security (Basic Authentication)
  • Material Design for Bootstrap
  • Docker
  • HATEOS
  • Spring Boot Admin
  • NoSQL (MongoDB)
  • MySQL (Connect to Multiple Schemas)
  • Micrometer
  • Grafna

Running the application locally

There are several ways to run a Spring Boot application on your local machine. One way is to execute the main method in the com.arc.sbtest.SBtemplateApplication class from your IDE.

  • Download the zip or clone the Git repository.
  • Unzip the zip file (if you downloaded one)
  • Open Command Prompt and Change directory (cd) to folder containing pom.xml
  • Open Eclipse
    • File -> Import -> Existing Maven Project -> Navigate to the folder where you unzipped the zip
    • Select the project
  • Choose the Spring Boot Application file (search for @SpringBootApplication)
  • Right Click on the file and Run as Java Application

Alternatively you can use the Spring Boot Maven plugin like so:

mvn spring-boot:run

Security

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-security</artifactId>
</dependency>

Spring Boot Starter Security default username is user and a generated security password is printed in the console like Using generated security password: 0423bec1-6759-4ed2-8e3e-e8196effadf9

Automated dependency updates done via Dependabot

Actuator

To monitor and manage your application

URL Method
http://localhost:8080 GET
http://localhost:8080/actuator/ GET
http://localhost:8080/actuator/health GET
http://localhost:8080/actuator/info GET
http://localhost:8080/actuator/prometheus GET
http://localhost:8080/actuator/httptrace GET

URLs

URL Method Remarks
http://localhost:8080/bw/tech-stack GET Custom Response Headers
http://localhost:8080/api/generic-hello GET
http://localhost:8080/api/personalized-hello/ GET
http://localhost:8080/api/personalized-hello?name=spring-boot GET
http://localhost:8080/api/loggers GET

Person URLs

URL Method Remarks
http://localhost:8080/api/person GET Header Accept:application/json or Accept:application/xml for content negotiation
http://localhost:8080/api/person/1 GET

Documentation

Files and Directories

The project (a.k.a. project directory) has a particular directory structure. A representative project is shown below:

.
├── Spring Elements
├── src
│   └── main
│       └── java
│           ├── com.arc.application
│           ├── com.arc.application.config
│           ├── com.arc.application.controller
│           ├── com.arc.application.exception
│           ├── com.arc.application.model
│           ├── com.arc.application.util
│           ├── com.arc.application.repository
│           └── com.arc.application.service
├── src
│   └── main
│       └── resources
│           └── static
│           │   ├── css
│           │   │   └── bootstrap.css
│           │   ├── images
│           │   ├── js
│           │   ├── favicon.ico
│           │   └── index.html
│           ├── templates
│           │   └── view.html
│           ├── application.properties
│           ├── banner.txt
│           └── log4j2.xml
├── src
│   └── test
│       └── java
├── JRE System Library
├── Maven Dependencies
├── bin
├── logs
│   └── application.log
├── src
├── target
│   └──application-0.0.1-SNAPSHOT
├── mvnw
├── mvnw.cmd
├── pom.xml
└── README.md

packages

  • models — to hold our entities;

  • repositories — to communicate with the database;

  • services — to hold our business logic;

  • security — security configuration;

  • controllers — to listen to the client;

  • resources/ - Contains all the static resources, templates and property files.

  • resources/static - contains static resources such as css, js and images.

  • resources/templates - contains server-side templates which are rendered by Spring.

  • resources/application.properties - It contains application-wide properties. Spring reads the properties defined in this file to configure your application. You can define server’s default port, server’s context path, database URLs etc, in this file.

  • test/ - contains unit and integration tests

  • pom.xml - contains all the project dependencies

Reporting Issues

This Project uses GitHub's integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:

Resources

License

FOSSA Status

spring-boot-application-template's People

Contributors

anantharajuc avatar dependabot-preview[bot] avatar fossabot avatar

Watchers

James Cloos 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.