Giter Club home page Giter Club logo

spring-doh's Introduction

Spring...D'oh!

Brain-dead apps to get a feel of developing with Spring 4.

Idea

Explore Spring 4 features through coding; start with a just a few POJO's that do whatever they do (the so called business illogic?), then bean-ify them and build fully functional Spring apps to host them.

Hall of Shame

Featuring:

  1. Tripsters. Standalone POJO's to encode the core functionality without any dependencies on Spring. A tripster goes on a trip away from home and then comes back; each app will have a bunch of these happy dudes along with a tripster spotter who can show you a tripster's trip. Find the code in app.core.
  2. Bare Bones App. Simple CLI app to let you play with tripsters; it has no dependency on Spring. Look for it in app.run.
  3. Spring CLI App. Same as the bare bones app, but hosts beanified POJO's (see app.beans and app.config.Wiring) sprinkled with a few aspects (app.aspects) and configuration (app.config) in a CLI Spring container. Configuration is quite saucy with Java-based config, profiles and priorities. So bake in the container until crispy; take out of the oven and eat in app.run.
  4. Spring Boot Web App. Uses Spring MVC & REST controllers to make the core functionality available through an embedded Undertow Web server, courtesy of Spring Booty auto-configuration. Available in app.run.
  5. Spring Boot WebQ. Extends the Spring Boot Web App with an embedded HornetQ message queue for a taste of Spring JMS. You know where to find the Java class. (app.run? D'oh!)
  6. Testing. From unit to integration to end to end testing, we've got quite a spread of ingredients for the ultimate tech-cocktail: JUnit (with theories), Hamcrest, Mockito, and all the Spring testing goodies such as Mock MVC. Shake well and drink irresponsibly; recommended for sundowners.

The code in util is some general-purpose stuff I ended up writing myself as I went along because my Google searches for better options failed me. Grab if you think it could be any useful to you too.

All the code in this repository is Java 8 with heavy use of Java's very own flavour of streams and dysfunctional programming.

Build & Run...for the loo

Build and test everything:

./gradlew build

Use gradlew <task> (Unix; gradlew.bat for Windows) for finer control over building, testing, etc. This lists all available build tasks:

./gradlew tasks

To run any of the apps in the app.run package just follow the instructions in the app's Java Doc.

Tricksy Eclipsie

Using Eclipse? You can generate all project files with:

./gradlew eclipse

then just import the project into Eclipse; alternatively if you have the Gradle Eclipse plugin (Buildship), you could instead run:

./gradlew build

then import into Eclipse as a Gradle project.

Beer-time Reading

As I banged my forehead against the monitor, I found chapters 1 through 4 and chapter 21 of Spring in Action a decent pain killer. I then had to dig deeper in the Spring and Spring Boot manuals, but the best pain relief came from reading the Spring guys' source code on GitHub.

spring-doh's People

Contributors

c0c0n3 avatar

Watchers

 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.