Book Image

Full Stack Development with Spring Boot 3 and React - Fourth Edition

By : Juha Hinkula
5 (1)
Book Image

Full Stack Development with Spring Boot 3 and React - Fourth Edition

5 (1)
By: Juha Hinkula

Overview of this book

If you’re an existing Java developer who wants to go full stack or pick up another frontend framework, this book is your concise introduction to React. In this three-part build-along, you’ll create a robust Spring Boot backend, a React frontend, and then deploy them together. This new edition is updated to Spring Boot 3 and includes expanded content on security and testing. For the first time ever, it also covers React development with the in-demand TypeScript. You’ll explore the elements that go into creating a REST API and testing, securing, and deploying your applications. You’ll learn about custom Hooks, third-party components, and MUI. By the end of this book, you'll be able to build a full stack application using the latest tools and modern best practices.
Table of Contents (23 chapters)
Part I: Backend Programming with Spring Boot
Part II: Frontend Programming with React
Part III: Full Stack Development
Other Books You May Enjoy

Preparing the Spring Boot backend

We will begin frontend development in this chapter with the unsecured version of our backend. Then:

  • In Chapter 13, Adding CRUD Functionalities, we will implement all the CRUD functionalities.
  • In Chapter 14, Styling the Frontend with MUI, we will continue to polish our UI using Material UI components.
  • Finally, in Chapter 16, Securing Your Application, we will enable security in our backend, make some modifications that are required, and implement authentication.

In Eclipse, open the Spring Boot application that we created in Chapter 5, Securing Your Backend. Open the file that defines the Spring Security configuration. Temporarily comment out the current configuration and give everyone access to all endpoints. Refer to the following modifications:

public SecurityFilterChain filterChain(HttpSecurity http) throws Exception
    // Add this one
    http.csrf((csrf) -> csrf.disable())...