Code Monkey home page Code Monkey logo

ch8's Introduction

Taco Cloud v0.0.6

This folder contains the source code for the Taco Cloud sample from Spring in Action, 5th edition, as presented in Chapter 6.

There may be portions of the application that are not fully functional (yet), but the code that is relevant to chapter 6 should be complete and ready to run.

It’s also important to note that example code tends to evolve throughout the course of a chapter. Moreover, there are often many different variants of a given piece of code presented. The sample code given here may only represent one such variant or evolution.

Running Taco Cloud

Starting with Chapter 6, Taco Cloud is broken into a multi-module Maven project. To build the full project, use mvnw (the Maven wrapper) at the command line like this:

% ./mvnw clean package

The Maven build will also build the Angular client code and package it along with the Spring code. To do that, you’ll need to make sure that you have Node and the Angular CLI installed before building the project. (See https://cli.angular.io/ for details.)

Once the project is built, you can run the executable JAR file from the tacos project:

% java -jar tacos/target/taco-cloud-0.0.6-SNAPSHOT.jar

Once the application has started, open your web browser and navigate to http://localhost:8080 to see the Taco Cloud home page.

Kicking the tires

As mentioned above, not all of the Taco Cloud application is fully functional (yet). But the components that pertain to the topic of Chapter 6, defining a REST API, should be in place.

From the home page, you should be able to view some recently created tacos by clicking on "Latest designs" link at the top. The "Specials" and "Locations" links will navigate to their respective pages, but those pages are (for now) empty.

Click the "DESIGN A TACO" link to create a taco and ultimately create an order. You can view the contents of your shopping cart by clicking on the cart/price at the top right.

What’s missing/broken…​

The three most prominent pieces that still need to be fixed are:

  • Security isn’t working yet, so there’s no login page.

  • Likewise, there’s not yet any way to register.

These will be certainly be sorted out eventually, but priority was placed on writing code that demonstrated the subject of Chapter 6.

Taco Cloud modules

The multi-module Maven project is made up of the following modules:

  • tacocloud-api : The REST API

  • tacocloud-data : The persistence module

  • tacocloud-domain : The domain types

  • tacocloud-security : The security module (TODO: Not fully functional yet.)

  • tacocloud-ui : A Typescript Angular UI

  • tacocloud-web : The web module (largely leftovers from previous chapters. TODO: Clean up and remove.)

  • tacos : The main module that pulls the other modules together and provides the Spring Boot main class.

ch8's People

Contributors

intheeast 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.