Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Spring Boot and Angular
Spring Boot and Angular

Spring Boot and Angular: Hands-on full stack web development with Java, Spring, and Angular

Arrow left icon
Profile Icon Devlin Basilan Duldulao Profile Icon Seiji Ralph Villafranca
Arrow right icon
Can$34.99 Can$50.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9 (17 Ratings)
eBook Dec 2022 438 pages 1st Edition
eBook
Can$34.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial
Arrow left icon
Profile Icon Devlin Basilan Duldulao Profile Icon Seiji Ralph Villafranca
Arrow right icon
Can$34.99 Can$50.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9 (17 Ratings)
eBook Dec 2022 438 pages 1st Edition
eBook
Can$34.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial
eBook
Can$34.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Spring Boot and Angular

Spring Boot and Angular – The Big Picture

First of all, we would like to thank you for getting a copy of this book, which was created for developers to learn how to build a full-stack web application using the standards that are being used in the development industry. This book is tailored based on the applications we have developed from our training and workshops. So, let’s begin our adventure.

This chapter will serve as a short recap regarding the Java Spring Boot and Angular foundations to give you an idea of what lies ahead in terms of conducting web development for them. You will also learn how large the community is and that the support that’s available for Angular makes it reliable for developing applications.

In this chapter, we will cover the following topics:

  • Introducing Spring Boot
  • The advantages of using Spring Boot
  • What’s new in Java 17
  • Introducing Angular
  • The advantages of using Angular

Technical requirements

The GitHub repository for the application we will be building can be found at https://github.com/PacktPublishing/Spring-Boot-and-Angular.

Every chapter has a directory where the completed portion of the project is located.

Note

No directories will be available for Chapter 1, Spring Boot and Angular – The Big Picture, to Chapter 4, Setting Up the Database and Spring Data JPA because most of the topics we will be covering will consist of theories and some sample code. The actual project will begin in Chapter 5, Building APIs with Spring.

Introducing Spring Boot

Spring Boot is an open source micro framework from Pivotal. It is an enterprise-level framework for developers to create standalone applications on Java Virtual Machines (JVMs). Its primary focus is to shorten your code so that it’s easier for you to run your application.

The framework extends the Spring Framework, which provides you with a more opinionated way of configuring your applications. In addition, it comes with built-in autoconfiguration capabilities that configure both the Spring Framework and third-party packages based on your settings. Spring Boot uses this knowledge to avoid code errors at configuration time as it reduces boilerplate code when you’re setting up our application.

Now, let’s discuss the main advantages of using Spring Boot.

The advantages of using Spring Boot

The following are the four main advantages of using Spring Boot to develop applications:

  • Autoconfiguration: When you’re configuring your Spring Boot application, it downloads all the dependencies that will be needed to run your application. It will also configure your Spring Framework with the relevant third-party packages, depending on the settings you have applied. Thus, Spring Boot avoids boilerplate code and configuration errors, and you can directly start developing your Spring application.
  • Opinionated approach: Spring Boot uses a narrow approach to installing dependencies based on your application needs. It will install all the required packages of your application and removes the idea of configuring it manually.
  • Spring starters: You can choose a list of starter dependencies to define your application’s expected needs during the initialization process. One example of a Spring Starter is Spring Web, which allows you to initialize a Spring-based web application without configuring the dependencies that are required to run the application. Instead, it will automatically install the Apache Tomcat Web Server and Spring Security for authentication features.
  • Create standalone applications: Spring Boot can run standalone applications that have no dependencies on external web servers. For example, we can embed servers such as Tomcat and run the application.

Differences between Spring and Spring Boot

So, what is the difference between Spring and Spring Boot? And do you need to learn about the Spring Framework before working with Spring Boot? Let’s start with the first question.

The following table shows the difference between the two frameworks:

C:\Users\Seiji Villafranca\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\943B62F6.tmp

spring-boot-logo - THE CURIOUS DEVELOPER

The developers configure the dependencies for the project.

Using Spring Starters, Spring Boot will configure all the dependencies that will be needed to run the application.

Spring is a Java EE framework for building applications.

Spring Boot is commonly used to build REST APIs.

Spring simplifies the development of Java EE applications since modules such as Spring JDBC, Spring MVC, and Spring Security are already provided.

Spring Boot provides the configuration for the dependencies, reducing the boilerplate code for the layouts of modules. This makes it easier to run the application.

Dependency injection (DI) and inversion of control (IOC) are the main features of Spring for building applications.

Spring Boot Actuator is a feature that exposes operational information about your apps, such as metrics and traffic.

We can identify that Spring Boot is built on top of Spring and that the main difference is that Spring Boot automatically configures the dependencies we need to run a Spring application. So, to answer the question about needing to learn about the Spring Framework before working with Spring Boot, the answer is no – Spring Boot is just an extension of Spring, which makes configuring it faster because of its opinionated approach.

Now, let’s look at the dependencies we need in Spring and Spring Boot to configure a web application.

Dependency examples for Spring and Spring Boot

In Spring, the minimum dependencies that we need for our application to run are Spring Web and Spring Web MVC:

<dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-web</artifactId>
     <version>5.3.5</version>
</dependency>
<dependency>
     <groupId>org.springframework</groupId>
     <artifactId>spring-webmvc</artifactId>
<version>5.3.5</version>
</dependency>

Spring Boot only requires spring-boot-starter-web, which is a Spring Starter for our application to run. The necessary dependencies are added automatically at build time as the starter will be responsible for the configuration:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.4.4</version>
</dependency>

Another thing to consider in Spring is that we need to define some configurations, such as dispatcher servlets and mappings, for our application to run on the server:

public class SpringInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext container) {
AnnotationConfigWebApplicationContext context =
    new AnnotationConfigWebApplicationContext();
context.setConfigLocation("com.springexample");
container.addListener(new        ContextLoaderListener(context));
 ServletRegistration.Dynamic dispatcher =
     container.  addServlet("dispatcher",
         new  DispatcherServlet(context));
 dispatcher.setLoadOnStartup(1);
 dispatcher.addMapping("/");
   }
}

After initializing the dispatcher servlets, we also need to use @EnableWebMvc and have a Configuration class with a @Configuration annotation where we will instantiate a view resolver for the applications.

A new InternalResourceViewResolver() instance will be created in the configuration class. This will be a bean for Spring. Here, all the files that are under the /WEB-INF/view path with a .jsp file extension will be resolved:

@EnableWebMvc
@Configuration
public class SpringWebConfig implements WebMvcConfigurer {
   @Bean
   public ViewResolver viewResolver() {
       InternalResourceViewResolver bean =
           new  InternalResourceViewResolver();
   bean.setViewClass(JstlView.class);
   bean.setPrefix("/WEB-INF/view/");
   bean.setSuffix(".jsp");
   return bean;
   }
}

In Spring Boot, all these configurations will be omitted because this code is already included in the Spring Starters. We only need to define some properties for our application to run using the web starter:

spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp

After defining these properties, our application will run since all the necessary configurations, such as the Web Initializer and MVC Configuration, have been included.

With that, we have discussed the advantages of Spring Boot and, at the same time, the main differences between Spring Boot and the Spring Framework and how it reduces boilerplate code at configuration time.

As you may already know, the primary language of Spring is Java, and Java 17 has now been released. In the next section, we’ll learn about the new features in Java 17.

What’s new in Java 17?

We have decided to discuss Java 17 in this book as this is the next long-term support (LTS) version of Java, meaning that this version will be maintained for a more extended period. It was released on September 14, 2021, and includes several new security and development features.

Let’s look at some of the new features that have been included, as well as some modifications that have been applied to Java 17.

Sealed classes

Sealed classes were in the second preview stage in Java 16. Let’s say, for example, that we have a class that we have created in our code. We can assume that this class can be extended with any subclasses in our application. Thus, by making our classes sealed, we can ensure that our class can’t be extended by subclasses. If we want to allow some subclasses to extend our class, we can use the permits keyword to identify the specific classes we want to grant permission to, as shown in the following example:

public sealed class Animal permits Cat, Dog, Horse

The foreign function and memory API

A new API was introduced for accessing and using code outside the Java runtime, which it did by applying foreign functions (code outside the JVM) and safely accessing foreign memory (memory not handled by the JVM). The API allows a Java application to call native libraries without the Java Native Interface (JNI).

The API aims to replace the JNI with a pure Java development model and better performance while accessing off-heap data and omitting insecure operations.

Foreign memory

One common problem in Java today is accessing off-heap data. Off-heap data is data that’s stored in memory outside the Java runtime. We can say that this is a third-party library. Accessing this data is very critical to performance in that Java garbage collectors work only on on-heap data, which lets them avoid the unpredictability of garbage collections. The following APIs are used to handle off-heap data:

  • The ByteBuffer API: This API allows you to create direct ByteBuffers in off-heap data so that data can be managed outside the Java runtime. However, the major drawback of ByteBuffer is that its maximum size is 2 GB and that it is not deallocated promptly, causing the application’s runtime performance to slow down.
  • The Sun.misc.Unsafe API: The Unsafe API exposes access operations that work on off-heap data. This API makes this process efficient since the Just-in-Time (JIT) compiler optimizes access operations. However, using the Unsafe API is discouraged as we are allowing access to any memory location.
  • The Foreign Function and Memory API: This API solves the dilemma of accessing the memory’s location and sacrificing runtime performance as it provides classes and interfaces where applications can do the following:
    • Allocate Foreign Memory
    • Manipulate and access foreign memory
    • Call Foreign Functions

Pattern matching with switch statements

Pattern matching is the idea of testing patterns and complicated expressions in switch statements. This new feature allows for more extensible and flexible usage of switch statements to accept complex expressions.

The Applet API

The Applet API is rarely used in Java as all browsers have removed support for Java browser plugins.

The experimental AOT and JIT compilers

The experimental Java-based ahead-of-time (AOT) and JIT compilers have been removed since their features have limited usage.

These are just some of the changes that have been applied to Java 17. Now, let’s learn about Angular, one of the top JavaScript frameworks today, and the advantages of using the Angular framework to develop your frontend.

Introducing Angular

Angular is a free and open source JavaScript framework that’s maintained by Google. It was built mainly for developing web applications and has expanded its capabilities to being used to create mobile and desktop applications using plugins. Angular uses component-based code, is progressive, and offers many libraries and extensions that shorten the time of developing large-scale applications.

At the time of writing, Angular is very popular for building frontend applications. It is the primary framework for developing applications for large and well-known companies such as Samsung, Upwork, PayPal, and Google. It also has a very active community and has 76,000 stars on GitHub, with around 1,500 people contributing to the framework. In addition, it has thousands of functional NPM libraries that you can use to speed up your development.

History of Angular

Before it became Angular, the first developed framework by Google was AngularJS or Angular Version 1. Although developers are typically confused by this, due to thinking that AngularJS and Angular are similar, AngularJS was released as an open source framework by Miško Hevery, a Google employee, who was developing AngularJS to develop web applications faster.

AngularJS, where you use JavaScript or Dart, became popular as its community became more extensive. At the same time, the Ionic framework was released, which allowed developers to use AngularJS to build native mobile applications.

The Great Rewrite

The fast and rapid development of JavaScript technology has affected the popularity of AngularJS, and the team came to the end of the road regarding the framework – no improvements were to be made. From 2014 to 2015, the Google team and the community decided to support mobile and large enterprise applications with the framework. Their first port of call was The Great Rewrite and not incrementing the design of AngularJS. The Great Rewrite is where Angular 2.0, or simply Angular, was released.

The problem with action

Many applications were already running on AngularJS, which meant that if a completely new version of Angular was released, support would come to an end for AngularJS users. So, another main question here was, "How would those applications be supported after several years?"

The other issue that emerged is that there was no direct way to migrate from AngularJS to Angular 2.0, which was difficult for developers. This was a massive step for teams – so much so that new concepts and breaking changes were introduced on every release.

The framework’s comeback

Even though migrating Angular was painful, the enterprise applications that had been created by Google were supported. Around 2018, this became more stabilized as the framework had a large set of features that were ready to be used to build large applications. In addition, it didn’t depend on third-party libraries to create forms and call HTTP requests because all the dependencies were already included. Google also released some documentation to help developers migrate AngularJS to the latest version of Angular.

Angular is very popular and is very effective at developing enterprise applications. Now, let’s look at the advantages of Angular and why it is effective for development.

The advantages of using Angular

Angular is a component-based framework, which means that we develop parts of our applications into smaller pieces, and we can reuse these pieces throughout the application. This feature reduces boilerplate code and code errors by ensuring there’s not as much repetitive code. One of the main advantages of Angular is its language. Let’s take a closer look.

TypeScript-based framework

Angular is a TypeScript language-based framework. This language is a significant advantage since TypeScript offers features that are beneficial to development. In addition, it is a superset of JavaScript, which added new concepts that make code maintainable and effective:

Figure 1.1 – TypeScript – a superset language

Figure 1.1 – TypeScript – a superset language

As we can see, TypeScript is built on top of ES6 and JavaScript, which is intended to add more features for development. Some of TypeScript’s components include Generics, Types, and Interfaces, which we know are directly related to object-oriented programming (OOP). Now, let’s look at another advantage.

Static type data

TypeScript can define static type data, which allows variables to be strictly typed. Compared to plain JavaScript, the compiler alerts you if there are any type-related mistakes – that is, which errors were caught at runtime. Thus, TypeScript can avoid mistakes in production by prompting you with these issues at compile time.

Predictability and maintainability

Since TypeScript is strictly typed, this contributes to the concept of predictability. For example, a variable is declared as a number. Therefore, it will always stay a number throughout the application, and functions will specify how to implement them as all parameters are also strictly typed. Furthermore, TypeScript is also maintainable as it gives developers the power to debug applications at compilation time.

IDE support

Since TypeScript is becoming a more widely used language, more IDEs are supporting it. IDEs offer several features such as code navigation, autocompletion, and plugins.

Microsoft Visual Studio is the primary IDE that’s used for TypeScript. However, some IDEs and editors are also available for running TypeScript:

  • Atom: A cross-platform editor
  • Eclipse: An IDE that has a plugin for TypeScript
  • Visual Studio Code: A lightweight cross-platform editor by Microsoft

OOP

TypeScript is an object-oriented language, which means it supports concepts such as classes, interfaces, and inheritance. OOP is very scalable as we develop our applications into objects, which can be an advantage if we’re developing growing applications.

Early spotted bugs

Browsers do not understand TypeScript directly. Instead, they use transpilers, which compile the code into plain JavaScript. Here, all errors related to syntax and types are caught, allowing developers to worry about the code logic instead.

These are just the advantages of the TypeScript language. Now, let’s look at the benefits of Angular itself.

Support for large enterprise applications

Angular is considered an all-in-one package framework in that most of the standard features that are needed to build an application are already included. This includes modules. For example, to use forms in an Angular application, we must import FormsModule and ReactiveormsModule. Other examples are navigation and routes. Angular provides RouterModule so that you can create routes within the application.

Single-page application

Angular is a single-page application (SPA), which means that when a user navigates from one page to another, the page doesn’t reload as it’s the data that’s being fetched by the server. In addition, the client’s resources are independent and are already loaded in the browser, which contributes to the loading performance of the application.

Progressive web apps (PWAs)

Progressive web apps (PWAs) are becoming a trend nowadays. They are a solution that allows web applications to run on mobile apps, as well as different platforms, both online and offline. It is straightforward to configure Angular as a PWA thanks to its schematics – with just a single line of code, your Angular app is configured. PWAs can also be uploaded into the Android Play Store and Microsoft Store using PWA Builder.

The following command uses the Angular CLI to convert our application into a PWA:

ng add @angular/pwa

The Angular CLI

We don’t need to create or configure Angular from scratch. Instead, we can use the Angular CLI, which helps install the necessary dependencies to run our Angular application successfully. Although the schematics features are responsible for creating the required files, installing the packages, and configuring the values that we need for our application, the Angular CLI generates boilerplate code for modules, components, services, and directives for faster development.

In the following code, we’re using npm to install the Angular CLI and generate our code using the ng command:

//command for installing angular CLI
npm install -g @angular/cli
//command for creating a new Angular App
ng new –project-name
// command for creating a new Component
ng generate component –component-name
// command for creating a new Service
ng generate service –component-name
// command for creating a new Module
ng generate module –component-name

Module and component-based framework

Angular is grouped into modules, which makes it easier to maintain the code’s structure. In addition, each part of the application can be grouped by its function and placed in a single module, making it easier to navigate the application’s features. It is also beneficial in unit testing as the code is tested separately, allowing for complete quality control.

Creating code as components promotes reusability and boilerplate reduction. Let’s look at an example of a navigation menu:

<!— Example code for nav bar -->
<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">Nav bar</a>
    </div>
    <ul class="nav navbar-nav">
      <li class="active"><a href="#">Home</a></li>
      <li><a href="#">Home</a></li>
      <li><a href="#">About</a></li>
      <li><a href="#">Contact Us</a></li>
    </ul>
  </div>
</nav>

The navigation bar must be present on every page of our application. This process will cause redundant code, which means we will have to repeat this code over and over again. However, in Angular, it has been developed into a component, allowing us to reuse the code in different parts of the application. A specific selector is assigned to the navigation bar code and used as the HTML tag for the component, as shown in the following code:

<!—example selector for the navigation bar component-->
<app-navigation-bar/>

Cross-platform-enabled

Angular is used to build applications for the web, as well as native mobile and desktop applications. This is now possible through frameworks, such as Ionic, NativeScript, and Electron. Aside from PWAs, Ionic and NativeScript are also used to create mobile apps using Angular. On the other hand, Electron is a framework that transforms your Angular app into a desktop application using a similar code base. This feature makes Angular very flexible as a single framework can cover all the platforms for your application.

Web components

Angular supports web components, which are also known as Angular elements. Here, the idea is to break an application into smaller pieces and distribute it into an independent application or package that can be distributed and used on other applications. Angular elements cover the concepts of micro frontends. Every element has a pipeline for deployment. This component can also be used in different JavaScript frameworks, such as React and Vue.

Supports lazy loading

Loading all the JavaScript code in the client browser could introduce some issues. If the applications get more extensive, more code would be packed into one chunk. We don’t want to bootstrap all of our code as this would cause our application to load slowly when it’s started for the first time. We only want to load what is needed on demand. The lazy loading feature by Angular solves this. It only loads the modules, components, services, directives, and other elements of the application that are needed for a specific route. This feature reduces the loading time as the user initially opens the application.

In the following code, we’ve defined some routes as an array where we add new routes as an object. To enable lazy loading, we must use the loadChildren properties to load the modules on demand:

const route: Routes = [
    {
     path: "about",
 loadChildren: () =>
   import("./src/app/AboutModule").then(m =>
      m.AboutModule)
    },
   {
     path: "contact",
     loadChildren: () =>
       import("./src/app/ContactModule").then(m =>
         m.ContactModule)
    }
];

In the preceding code, as the user navigates to the about path, it will only load AboutModule, which contains the resources for that specific route. It will not load the resources under ContactModule unless the user navigates to the contact path.

Summary

In this chapter, you learned that Spring Boot is an open source framework extension for Spring and that it mainly solves the boilerplate code when you’re configuring the Spring Framework. In addition, it provides Spring Starters, which developers can use to allow Spring Boot to configure the required dependencies automatically.

On the other hand, Angular is a component-based framework that’s built with the TypeScript language to give it OOP powers. Moreover, it has cross-platform support, which allows developers to create applications on the web, mobile, and desktop. Angular is one of the top JavaScript frameworks as it is used by several large companies and is supported by Google and a large community.

In the next chapter, you will learn about the software that you must install on your computer and set up the development environment for full stack development.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Find solutions to common problems faced while developing applications with Angular and Spring Boot
  • Explore tips, tricks, and best practices to overcome challenges related to source code
  • Build applications faster and more efficiently using the Spring Framework and the Spring Boot extension

Description

Angular makes building applications with the web easy and Spring Boot helps get an application up and running using just a few lines of code and minimal configuration. This book provides insights into building full-stack apps using Angular and Spring Boot effectively to reduce overall development time and increase efficiency. You'll start by setting up your CI/CD pipeline and then build your web application’s backend guided by best practices. You'll then see how Spring Boot allows you to build applications faster and more efficiently by letting the Spring Framework and Spring Boot extension do the heavy lifting. The book demonstrates how to use Spring Data JPA and add its dependencies along with Postgres dependencies in the project to save or persist a user's data in a database for future use. As you advance, you'll see how to write tests and test a service using Mockito. Finally, you'll create a CI workflow or pipeline for a Spring Boot and Angular application to enable operations to deliver quality applications faster. By the end of this Spring Boot and Angular book, you'll be able to build a full-stack web application and deploy it through continuous integration and continuous deployment.

Who is this book for?

The book is for busy Java web developers and TypeScript developers with little experience developing Angular and Spring Boot apps who want to learn best practices for building full-stack web apps. Basic knowledge of HTML, CSS, and JavaScript or the Java programming language is necessary.

What you will learn

  • Explore how to architect Angular for enterprise-level app development
  • Create a Spring Boot project using Spring Initializr
  • Build RESTful APIs for enterprise-level app development
  • Understand how using Redis for caching can improve your application s performance
  • Discover CORS and how to add CORS policy in the Spring Boot application for better security
  • Write tests to maintain a healthy Java Spring Boot application
  • Implement testing and modern deployments of frontend and backend applications

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 16, 2022
Length: 438 pages
Edition : 1st
Language : English
ISBN-13 : 9781803234533
Vendor :
VMware
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Dec 16, 2022
Length: 438 pages
Edition : 1st
Language : English
ISBN-13 : 9781803234533
Vendor :
VMware
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Can$ 190.97
Learning Spring Boot 3.0
Can$56.99
Spring Boot and Angular
Can$63.99
Full Stack Development with Spring Boot and React
Can$69.99
Total Can$ 190.97 Stars icon

Table of Contents

23 Chapters
Part 1: Overview of Spring Boot and Angular Development Chevron down icon Chevron up icon
Chapter 1: Spring Boot and Angular – The Big Picture Chevron down icon Chevron up icon
Chapter 2: Setting Up the Development Environment Chevron down icon Chevron up icon
Part 2: Backend Development Chevron down icon Chevron up icon
Chapter 3: Moving into Spring Boot Chevron down icon Chevron up icon
Chapter 4: Setting Up the Database and Spring Data JPA Chevron down icon Chevron up icon
Chapter 5: Building APIs with Spring Chevron down icon Chevron up icon
Chapter 6: Documenting APIs with the OpenAPI Specification Chevron down icon Chevron up icon
Chapter 7: Adding Spring Boot Security with JWT Chevron down icon Chevron up icon
Chapter 8: Logging Events in Spring Boot Chevron down icon Chevron up icon
Chapter 9: Writing Tests in Spring Boot Chevron down icon Chevron up icon
Part 3: Frontend Development Chevron down icon Chevron up icon
Chapter 10: Setting Up Our Angular Project and Architecture Chevron down icon Chevron up icon
Chapter 11: Building Reactive Forms Chevron down icon Chevron up icon
Chapter 12: Managing States with NgRx Chevron down icon Chevron up icon
Chapter 13: Saving, Deleting, and Updating with NgRx Chevron down icon Chevron up icon
Chapter 14: Adding Authentication in Angular Chevron down icon Chevron up icon
Chapter 15: Writing Tests in Angular Chevron down icon Chevron up icon
Part 4: Deployment Chevron down icon Chevron up icon
Chapter 16: Packaging Backend and Frontend with Maven Chevron down icon Chevron up icon
Chapter 17: Deploying Spring Boot and the Angular App Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Most Recent
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9
(17 Ratings)
5 star 47.1%
4 star 23.5%
3 star 11.8%
2 star 11.8%
1 star 5.9%
Filter icon Filter
Most Recent

Filter reviews by




Michael Ball Oct 14, 2024
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
While I can see how this book can be helpful with understanding core concepts around Spring Boot with Java, and Angular, I bought this book in the hopes that it would verbatim tell me how the two cooperate together, and IT DOESN'T. I stopped after chapter 10 because if that concept was going to be discussed anywhere, it would've been chapter 10 for sure. I'm disappointed I wasted nearly $50. Don't do it, please. Take my 8+ years of professional developer experience as a forewarning: I expected a lot more and got typos, outdated Github code, and the main reason for buying the book left unanswered!
Amazon Verified review Amazon
N/A Jul 19, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Feefo Verified review Feefo
C. Krishna Feb 20, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Useful
Amazon Verified review Amazon
Chris Baek Jan 29, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Book came in mint condition. Nothing to complain and it came before my class started. Recommend
Amazon Verified review Amazon
Luis F. Dec 14, 2023
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I normally don't write reviews. However, I'm a bit bothered that I wasted my time reading more than half of this book when I realized that the code is deprecated. That's fine. I understand that this can happen at any minute. So then I said to myself "The book's GitHub must have the updated version so that a would-be student like myself would be able to continue following the development without all these deprecation warnings" The GitHub code was also deprecated. Being a noob, I had a hard time getting my code (the book's code) to work without all the warnings of deprecation. I finally finished the Spring Boot section when I realized that the Angular section does not tie together with the Spring Boot development. It's as though two books were put together having nothing in common. The reason I bought this book was to learn how to develop Spring Boot with Angular.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.