
Explore RESTful development with Spring Boot in this bootcamp, building a calculator REST API and a product management app with MySQL, plus role-based authentication and authorization with JWT and OAuth2.
Prepare your development environment for the Spring Boot boot camp. Install Java JDK 8, Spring Tool Suite 4, and MySQL with internet access to build a hello-world REST API.
Learn to build a hello world rest api with Spring Boot by creating a Spring Tools 4 project, adding a rest controller, and exposing /api/hello.
Develop a calculator API with add, subtract, and multiply using Spring Boot, following a simple front-end and back-end architecture, and test JSON-based requests with Postman.
Build a calculator api with spring boot by scaffolding a spring starter project, creating a numeric model and rest controller, and implementing add, subtract, and multiply endpoints.
Test and validate the calculator API by running a Spring Boot project, using Postman to send JSON payloads with a and b, and inspecting responses.
Build a RESTful API for product management with Java Spring Boot, Spring JPA, and MySQL, covering create, update, get by id, get all, and delete by id, tested via Postman.
Create a new MySQL database and SpringProduct schema with a product table (id, productname, price, stock, created), grant schema privileges to springuser, and prepare a product management project.
Create a new spring boot project with the spring starter wizard named productapi, adding spring web, spring data jpa, and mysql driver dependencies, then finish and download maven dependencies.
Configure Spring Data JPA with MySQL by editing application.properties, map a product entity to the table, create a repository extending CrudRepository, and publish a rest api through a controller.
Develop a product management API by creating a @RestController, wiring a ProductRepository via @Autowired, and implementing CRUD operations (add, update, get by id, get all, delete) with JPA.
Test and validate the product management api by running Spring Boot, configuring access, and performing add, get, update, and delete operations via Postman.
Define authentication and authorization, explain verification of identity and access rights, and explore building a Spring Boot API with basic authentication and role-based authorization.
Build a Spring Boot API with basic authentication and role-based authorization, using JPA and MySQL, and test REST endpoints with Postman.
Prepare a MySQL database for a Spring Boot API by creating a SpringUdemy database and an appuser table with id, username, password, and role, with non-null constraints and privileges.
Create a new spring boot project in Spring Tool Suite by selecting Spring Starter Project, adding Spring Web, Spring JPA with MySQL driver, and Spring Security to prepare your template.
Define the AppUser entity for Spring JPA to map id, username, password, and role to MySQL. Create AppUserRepository extending CrudRepository with a findByUsername query for basic authentication.
Configure database settings in application.properties for spring.datasource to MySQL, set username and password, specify dialect, note that tables are pre-created, and integrate basic authentication into the project.
Implement basic authentication for a Spring Boot API by wiring a user details service, loading users by username from a repository, and configuring HTTP basic security with admin restrictions.
Create and expose rest api controllers in a Spring Boot project, including common user and admin endpoints, using principal for usernames and basic authentication.
Test the securitybasicapp project by running the app, configuring user roles (ROLE_USER, ROLE_ADMIN), and validating basic authentication with Postman on /api/greeting/hello.
Introduce OAuth2 as an open framework based on RFC 6749. Describe resource owner, authorization server, resource server, and grant types such as authorization code, implicit, password, client credential, device code.
Develop a Spring Boot RESTful API with OAuth2 authentication and role-based authorization, backed by a MySQL database, configured with Spring JPA and tested via Postman.
Set up a Spring OAuth2 backend by creating database SpringOAuth, three tables (appuser, oauth_access_token, ouath_refresh_token), seed user data, and prepare project access with OAuth2 and Postman testing.
Create a Spring Boot project for an OAuth2 application, selecting Spring Web for rest api, Spring Data JPA, MySQL driver, Spring Security, OAuth2 Client, and OAuth2 Resource Server, plus spring-security-oauth2-autoconfigure.
connect a spring boot project to mysql using spring jpa, map the appuser entity, create appuserrepository with a username query, and configure oauth2 for the project.
Build OAuth2 support for a Spring Boot API by implementing a custom user details service and authentication provider, configuring an authorization server and token store.
Developing spring boot api demonstrates implementing a resource controller with oauth2 token management, including /token and /revoke, plus greeting and admin resources secured by the admin role, tested with Postman.
test a Spring Boot OAuth2 api with Postman by obtaining an access token from /oauth/token using password grant, then access endpoints with a bearer token and observe 401 and 403.
Develop a Spring Boot API with OAuth2 and JWT, using JPA and MySQL for a role-based application, including database setup, REST API controllers, and testing.
Prepare the SpringOAuthJwt database for oauth2 and jwt by creating tables such as users, oauth_client_details, oauth_client_token, oauth_code, oauth_access_token, and oauth_refresh_token. Define usernames, passwords, and authority for proper role handling.
Create a new OAuth2 JWT project with a Spring Starter Project, selecting Spring Web, Spring Data JPA, MySQL Driver, and Spring Security; add spring-security-oauth2-autoconfigure and spring-security-jwt libraries.
Configure the database for a Spring Boot project by using existing tables without creating entities, and rely on a provided user account and access token to access the database.
Define and configure OAuth2 and JWT security in spring boot. Load the certificate, use openssl and keytool, and store tokens and credentials in a MySQL database.
Create resources for a REST API, return ResponseEntity.ok() with principal, and enable security with @EnableGlobalMethodSecurity securedEnabled = true and BCryptPasswordEncoder for AdminResource and GreetingResource, ensuring admin role access.
Test the spring boot api by setting up oauth clients and users, obtaining a bearer token, and validating access to greeting and admin endpoints.
This course is designed for every developer who wants to build RESTful API using Java Spring Boot. Course contents consists of three grades: Beginning (Level 100), Intermediate (Level 200) and Advanced (Level 300) so you can improve your development skill while learning this course. You can see a course grade on each section.
The course is intended to build RESTful API using Spring Boot with step-by-step approach. It's suitable for junior web developers and welcoming for senior web developers too. All project samples are written in Java. Java programming skills are required.
Required Lab Environment
To perform this course, you should prepare these materials:
Computer with Windows 10, macOS and Linux
Java JDK 8 or later
Spring Tool 4 (Recommended)
Please enjoy your course. Please let me if you have questions corresponding to this course.