GithubHelp home page GithubHelp logo

maojunya / spring-data-fundamentals Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leanstacks/spring-data-fundamentals

0.0 2.0 0.0 58 KB

A companion for the LeanStacks YouTube channel playlist entitled Spring Data Fundamentals.

Home Page: http://www.leanstacks.com

License: Apache License 2.0

Java 100.00%

spring-data-fundamentals's Introduction

Spring Data Fundamentals

Acknowledgements

This is a LEANSTACKS solution.

For more detailed information and instruction about constructing Spring Boot RESTful web services, see the book Lean Application Engineering Featuring Backbone.Marionette and the Spring Framework.

LEANSTACKS offers several technology instruction video series, publications, and starter projects. For more information go to LeanStacks.com.

Repository

This repository is a companion for the LEANSTACKS YouTube channel playlist entitled Spring Data Fundamentals.

Repository Organization

Each episode of the Spring Data Fundamentals video series has a corresponding branch in this repository. For example, all of the source code illustrated in the episode entitled Abstracting Common Transactional Attributes into a Mapped Superclass with Spring Data JPA may be found on the repository branch named transactional-entity.

Branches

transactional-entity

The branch named transactional-entity contains the source code illustrated in the episode Abstracting Common Transactional Attributes into a Mapped Superclass with Spring Data JPA.

reference-entity

The branch named reference-entity contains the source code illustrated in the episode Abstracting Common Reference Data Attributes into a Mapped Superclass with Spring Data JPA.

joda

The branch named joda contains the source code illustrated in the episode Using JODA Framework Classes as JPA Entity Model Attributes with Spring Data JPA.

jpa-query-definition

The branch named jpa-query-definition contains the source code illustrated in the episode Exploring Spring Data JPA Query Definition Strategies.

jpa-mysql

The branch named jpa-mysql contains the source code illustrated in the episode Using a MySQL Database with Spring Data JPA.

flyway

The branch named flyway contains the source code illustrated in the episode Using Flyway with Spring Boot for Database Migrations.

liquibase

The branch named liquibase contains the source code illustrated in the episode Using Liquibase with Spring Boot for Database Migrations.

Languages

This project is authored in Java.

Installation

Fork the Repository

Fork the Spring Data Fundamentals repository on GitHub. Clone the project to your host machine.

Dependencies

The project requires the following dependencies be installed on the host machine:

  • Java Development Kit 8 or later
  • Apache Maven 3 or later

Running

The project uses Maven for build, package, and test workflow automation. The following Maven goals are the most commonly used.

spring-boot:run

The spring-boot:run Maven goal performs the following workflow steps:

  • compiles Java classes to the /target directory
  • copies all resources to the /target directory
  • starts an embedded Apache Tomcat server

To execute the spring-boot:run Maven goal, type the following command at a terminal prompt in the project base directory.

mvn spring-boot:run

Type ctrl-C to halt the web server.

This goal is used for local machine development and functional testing. Use the package goal for server deployment.

test

The test Maven goal performs the following workflow steps:

  • compiles Java classes to the /target directory
  • copies all resources to the /target directory
  • executes the unit test suites
  • produces unit test reports

The test Maven goal is designed to allow engineers the means to run the unit test suites against the main source code. This goal may also be used on continuous integration servers such as Jenkins, etc.

To execute the test Maven goal, type the following command at a terminal prompt in the project base directory.

mvn clean test

package

The package Maven goal performs the following workflow steps:

  • compiles Java classes to the /target directory
  • copies all resources to the /target directory
  • executes the unit test suites
  • produces unit test reports
  • prepares an executable JAR file in the /target directory

The package Maven goal is designed to prepare the application for distribution to server environments. The application and all dependencies are packaged into a single, executable JAR file.

To execute the package goal, type the following command at a terminal prompt in the project base directory.

mvn clean package

The application distribution artifact is placed in the /target directory and is named using the artifactId and version from the pom.xml file. To run the JAR file use the following command:

java -jar example-1.0.0.jar

By default, the batch and hsqldb profiles are active. To run the application with a specific set of active profiles, supply the --spring.profiles.active command line argument. For example, to start the project using MySQL instad of HSQLDB and enable the batch process:

java -jar example-1.0.0.jar --spring.profiles.active=mysql,batch

spring-data-fundamentals's People

Contributors

mwarman avatar

Watchers

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