Book Image

Hands-On Full Stack Development with Spring Boot 2 and React - Second Edition

By : Juha Hinkula
Book Image

Hands-On Full Stack Development with Spring Boot 2 and React - Second Edition

By: Juha Hinkula

Overview of this book

React Hooks have changed the way React components are coded. They enable you to write components in a more intuitive way without using classes, which makes your code easier to read and maintain. Building on from the previous edition, this book is updated with React Hooks and the latest changes introduced in create-react-app and Spring Boot 2.1. This book starts with a brief introduction to Spring Boot. You’ll understand how to use dependency injection and work with the data access layer of Spring using Hibernate as the ORM tool. You’ll then learn how to build your own RESTful API endpoints for web applications. As you advance, the book introduces you to other Spring components, such as Spring Security to help you secure the backend. Moving on, you’ll explore React and its app development environment and components for building your frontend. Finally, you’ll create a Docker container for your application by implementing the best practices that underpin professional full stack web development. By the end of this book, you’ll be equipped with all the knowledge you need to build modern full stack applications with Spring Boot for the backend and React for the frontend.
Table of Contents (22 chapters)
Free Chapter
1
Section 1: Backend Programming with Spring Boot
7
Section 2: Frontend Programming with React
12
Section 3: Full Stack Development

To get the most out of this book

The reader should possess the following:

  • Basic knowledge of using a terminal, such as PowerShell
  • Basic knowledge of Java and JavaScript programming
  • Basic knowledge of SQL databases
  • Basic knowledge of HTML and CSS

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hands-On-Full-Stack-Development-with-Spring-Boot-2-and-React-Second-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "You can change the port in the application.properties file."

A block of code is set as follows:

@SpringBootApplication
public class CardatabaseApplication {
private static final Logger logger = LoggerFactory.getLogger(CardatabaseApplication.class);
public static void main(String[] args) {
SpringApplication.run(CardatabaseApplication.class, args);
logger.info("Hello Spring Boot");
}
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

import React from 'react';

const MyComponent = () => {
// This is called when the button is pressed
const buttonPressed = () => {
alert('Button pressed');
}

Any command-line input or output is written as follows:

npx create-react-app myapp

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Download the latest Long-Term Support (LTS) version for your operating system."

Warnings or important notes appear like this.
Tips and tricks appear like this.