Giter Club home page Giter Club logo

choonchernlim-archetype-webapp's Introduction

choonchernlim-archetype-webapp

Groovy-based Maven WAR archetype using Spring Boot with the capability of generating static code analysis reports for Continuous Integration servers.

Back-End Stack

Handles app security and generates Restful web services for front-end stack to consume. Spring Boot serves as the backbone of this archetype.

Key Dependencies Description
Swagger RESTful web services documentation tool and viewer
Apache Tomcat Embedded JEE server (for local development)
H2 Embedded database (for local development)
Spring Dependency injection, handles plumbing code
Spring Security App security
Spring Data JPA JPA-based repositories
Hibernate ORM framework
Spock Groovy test cases
Spring Boot CI Static code analysis reports for Continuous Integration servers

Front-End Stack

True single-page app from front-end-stack.

Prerequisites

  • Java version = 8.
  • Maven version >= 3.3.x.

Latest Release

<dependency>
  <groupId>com.github.choonchernlim</groupId>
  <artifactId>choonchernlim-archetype-webapp</artifactId>
  <version>2.0.0</version>
</dependency>

For example:

mvn archetype:generate 
-DinteractiveMode=false 
-DarchetypeGroupId=com.github.choonchernlim 
-DarchetypeArtifactId=choonchernlim-archetype-webapp 
-DarchetypeVersion=2.0.0
-DgroupId=com.github.choonchern.testProject 
-DartifactId=testProject 
-Dversion=1.0.0-SNAPSHOT

Getting Started

  • Run mvn clean spring-boot:run -Drun.profiles=local.

  • Open https://localhost:8443 in browser.

  • Follow further instruction on that main page.

Spring Profiles

  • This archetype is preconfigured with 3 Spring Profiles:-
    • middleware (default) - For generated WAR deployed in Middleware servers using JNDI data source. This is the default profile if spring.profiles.active is not specified.
    • local - For local development using H2 data source.
    • test - For running test cases.

How To...

Start Embedded Tomcat Server for Back-End Development

  • Run mvn clean spring-boot:run -Drun.profiles=local.

    • By default, this will perform yarn build to bundle the front-end JS files first before starting the server.
    • If there are no changes on front-end, you can speed it up by running mvn clean spring-boot:run -Drun.profiles=local -Pskip-frontend-build
  • Open https://localhost:8443 in browser.

Start Webpack Dev Server for Front-End Development

  • Change directory to src/main/frontend dir.

  • Run yarn start.

  • Open https://localhost:8080 in browser.

Create WAR File

  • Run mvn clean package.

Configure Jenkins Job

  • Create a "Freestyle project" job.

  • Under "Add build steps, select "Invoke top-level Maven targets".

    • Goals: -U clean test site

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.