
Discover building web services with Java and Spring Boot, and explore lambda expressions, streams, and functional interfaces through examples like a social service and a list API.
Explore how web services enable client-server communication over the internet, with web layers processing requests, business logic, and data layers using formats like JSON, XML, and text.
Discover how web services, defined by W3C, enable interoperable, platform-independent communication between clients and servers, handle requests via automated interactions, and route input to business logic.
Explore common web service data formats, including XML and JSON, and learn how requests, responses, and endpoints drive SOAP and REST interoperability in Spring Boot.
Explore the types of web services, including SOAP and REST, and how XML and JSON inputs, headers, envelopes, and WSDL shape requests and responses in Java web services.
Master the rest web service structure and api concepts. Learn how xml, json, and plain text inputs are handled via http methods like get, post, put, delete, and status codes.
Identify essential rest concepts by clarifying uris and representations, select input and output formats such as json or xml, and map endpoints to specific methods like insert, update, and delete.
Explore what Spring is, why we need it, and core concepts like dependency injection and inversion of control, including bean creation and a simple example for Spring web services.
Choose your IDE between Eclipse and IntelliJ, and follow along as the course uses IntelliJ for now and later covers Eclipse setup and spring project configuration.
Set up eclipse with the Spring Tool Suite, create a Spring starter project, add dependencies like Spring Web, and run a Spring Boot application to view console output.
Configure IntelliJ with spring support, create a spring starter project using Java 8 and Spring Web, run the app, and explore inversion of control and dependency injection for loose coupling.
Examine the tight coupling problem using a job interface implemented by doctor and engineer, then show why adding new professions requires changes, and introduce the open-closed principle for loose coupling.
Explore solving tight coupling by introducing a job interface and passing any implementing class (doctor, engineer, photographer) to achieve loose coupling, with manual mapping and spring component concepts.
Master the Spring auto wiring and component mechanism to auto wire beans and dependencies, replacing manual mapping with constructor and setter injection, as the application context wires components.
Start a spring app with auto wiring by reading the application context to load beans like Dr Anderson and the photographer, demonstrating automatic mapping and loose coupling.
discover how spring loads components, creates beans, and wires them by enabling debugging and logging to reveal the application context and component scanning.
Explore Spring modules, from web containers and data layer to integration and testing. See how ORM with Hibernate, JMS, and transactions fit into a Spring Boot project.
Explore the different Spring project types, including Spring Framework, Spring Cloud, Spring Data, and Spring Security. Learn how these products integrate with web services to support databases and secure applications.
Begin a soap web service project with Spring, exposing employee operations: detail, all employees, and removal, using request and response patterns in a guided workflow.
Set up a Spring Boot project for a soap web service, add Spring Web Services and Spring Data, with an in-memory database, then run the app on Tomcat.
Learn how an XSD schema defines request and response for a spring boot soap service, using an existing XML schema to generate request and response classes and endpoints.
Use eclipse to design the xml schema in design view and generate a get employee request and a get employee response, defining employee id, name, location, and zip code.
Generate JAXB classes from an XSD schema in a Spring Boot Maven project using a plugin to auto-create Java bindings, then run the app to verify integration with endpoints.
Create an endpoint class to handle a get employee request by mapping it to a get employee response, using a payload route with namespace and local part in Spring configuration.
Enable web services and configure a servlet-based message dispatcher to expose endpoints, register the dispatcher servlet, and define endpoint patterns and namespace details for request and response handling.
Create a wsdl definition using xsd by building beans, annotating metadata, and configuring the endpoint with a target namespace and the input schema loaded from resources.
Organize xsd for all request and response structures to support get all employees, get employee, and delete employee, detailing employee details, list vs single, and a boolean status.
Copy updated response structures into the original project, stop the server, and verify get employee records and get employee response reflect the changes with an offline repository for multiple employees.
Implement a service class with auto-wiring to fetch a single employee by id from an offline repository, map it to employee details, and return it through the endpoint.
Test a Java web service with Wizdler by implementing the employee service and exposing endpoints to get all employees, retrieve one, and delete on Tomcat.
Implement the get all employees method to return a list of employee details from a get all employee request. Map employees to details with a stream and collect for response.
Learn to implement a remove employee method in a Spring Boot REST service, returning a boolean after matching the employee id and updating the in-memory list.
Introduce Spring Security for web services using the extra security interceptor to validate username and password via a security policy, and integrate the interceptor into interceptors with a security adapter.
Implement a Spring security interceptor with a simple password validation callback to secure rest methods, configure dependencies and policy, and verify authenticated access.
Explore the essential parts of soap wsdl, including type, schema, messages, port type, binding, and service, with examples of get employee and get all employees operations.
Initialize a spring boot web service by creating a hello world application, adding spring web dependency, and running the app to expose a simple restful api on port 8080.
Explore the four REST methods get, post, put, and delete and how they drive employee data CRUD via postman.
Create your first rest API by building a welcome controller in a Spring Boot app, annotating it as a controller, and mapping a GET endpoint that returns a welcome message.
Explore building your first rest api with Spring Boot using get mapping and path variables to return a dynamic welcome message, handling input and core annotations.
Spring Boot auto configuration wires the dispatcher servlet, model-view-controller components, and embedded Tomcat, enabling rest APIs to handle requests and responses with minimal manual coding.
Create a real-time employee service project in Spring Boot, configuring web support, an in-memory database, and controllers, then explore response handling, exception management, and testing with Postman.
Create a Spring Boot employee service by modeling an employee with name and email, wiring a static data source, and exposing a get all employees endpoint via a REST controller.
Use postman to call a get method that retrieves all employees from the Spring Boot application, resolve bean type issues, and handle port in use by configuring server.port.
Implement a get by id endpoint in a Spring Boot application, using GetMapping, Java 8 streams and lambda to return the specific employee from the list.
Learn to implement a post method to save a new employee by posting a JSON body, adding to an in-memory list, and returning a 200 success response.
Implement exception handling to return meaningful errors when an employee is not found, replacing 200 responses with internal server error messages that convey 'employee not found' to clients, using Postman.
Create a custom employee not found exception and an exception handler to return a 404 not found response in a Spring Boot rest api.
Implement a global controller advice in Spring Boot to intercept errors across all controllers, using a custom employee exception response with message, description, and timestamp returned via a response entity.
Implement a granular exception handling strategy in a Spring Boot REST API by assigning dedicated handlers for specific exceptions, such as employee not found, to return customized 404 messages.
Implement proper error messages and success responses when creating an employee, returning the saved employee data via a response entity with a 201 status.
Implement a delete endpoint in a Spring Boot REST API to remove an employee from the collection, calling the service method and using a path variable with global exception handling.
Implement Spring Boot validation for employee services, using a global exception handler and response entity to return precise invalid input messages for name and email with detailed errors.
Implement hateoas in a rest service by returning an entity model with a link to get all employees, using WebMvcLinkBuilder to attach related endpoints.
learn how to implement content negotiation in rest services with spring boot, enabling xml and json responses by adding jackson data format support and testing with postman.
Learn to enable swagger UI in a Spring Boot app by adding the dependency, running the app, and viewing API documentation with endpoints, inputs, outputs, and employee definitions.
Explore how Swagger documentation in Spring Boot auto-generates API docs, including tags, paths, and definitions, and demonstrates input/output models like Employee with get, post, and delete operations.
Modify swagger documentation with a project-specific configuration, introducing a swagger configuration class, docket setup, and ApiInfo details like title, description, contact, and license to generate updated docs.
Explore Swagger UI's visual API documentation for Spring Boot REST endpoints, using the employee controller to test get all, get by id, and create operations.
Integrate Spring Boot actuator to monitor your services, expose health, info, and metrics endpoints, and explore beans and config properties to understand application status and performance.
Learn to limit API responses by applying static filtering in a Spring Boot REST controller, using @JsonIgnore/@JsonIgnoreProperties to exclude sensitive fields and return a filtered user details list.
Implement dynamic filtering for REST APIs using Jackson bean property filter and a global filter provider to return only user id and user name, replacing static filtering.
Enable basic username and password authentication in a Spring application by adding a security dependency, using the default user and password, and configuring security.user.name and security.user.password for Postman access.
Learn how to shift from hardcoded data to database-backed storage by using the Java Persistence API to map Java objects to relational data in a Spring Boot REST API.
Explore java jdbc overview, its bridge, native, network protocol, and teen drivers, and compare using driver manager or data source with manual ResultSet mapping to Spring JDBC.
Explore Spring JdbcTemplate as a powerful tool that eliminates boilerplate code, handles connections and exceptions, and supports named parameter, simple, and JDBC call approaches.
Learn the Java persistence API (JPA) as a bridge between object-oriented code and relational databases, covering entities, mapping with annotations, and relationships like one-to-many and many-to-many.
Create spring boot project to implement jpa by defining a student entity with id, name, and age, annotated as @Entity with @Id and generated value, using an in-memory h2 database.
Compare the entity manager and repository approaches in spring boot, and implement a simple student controller that persists data via a repository with transactions.
Demonstrates posting student name and age via Postman, annotating the request body, and storing data with Spring Boot, an auto-creating H2 database, and a JPA repository.
Extend a JPA repository to store student data in a Spring Boot app, letting the repository manage transactions and entity manager interactions for persistence.
Learn how to fetch all students with a JpaRepository and get a student by id using findById, while noting the optional result and the need for a default constructor.
Implement a one-to-many relationship between student and books in a Spring Boot JPA app, using repositories and lazy loading mappings to fetch books by student id.
Connect a real MySQL database server on Amazon Web Services to a Spring Boot project. Map employee and department tables to entities and configure application properties to establish the connection.
Convert dto's into database entities by annotating with @Entity, configuring identity generation, and mapping a one-to-many relationship between employee and department, then test the integration with a real-time MySQL database.
implement a get all employees endpoint by wiring a master employee repository backed by jpa, retrieving data from a real-time database, and returning all employee details.
Implement the get by id method to retrieve a single employee and their departments from the database using the employee repository, with optional handling and an exception when not found.
Implement a post method to store employee details via a repository, validate input constraints, and attach department information with foreign keys, illustrated by API calls.
Explore a step-by-step example of implementing one-to-many and many-to-one mappings between employees and departments in a spring boot rest service, including repository setup, controller logic, and testing with postman.
Implement the delete method by locating an employee through the repository, handling not-found cases, and using cascade delete to remove related department records, with verification via Postman.
RESTful Web Services
===================
This Course is designed for Software Professionals who are willing to learn RESTful Web Services in simple and easy steps. This tutorial will give you great understanding on RESTful Web Services concepts and after completing this tutorial you will be at intermediate level of expertise from where you can take yourself at higher level of expertise.
RESTful Web Services are basically REST Architecture based Web Services. In REST Architecture everything is a resource. RESTful web services are light weight, highly scalable and maintainable and are very commonly used to create APIs for web-based applications. This tutorial will teach you the basics of RESTful Web Services and contains chapters discussing all the basic components of RESTful Web Services with suitable examples.
Advantages of RESTful Web Services:
Fast: RESTful Web Services are fast because there is no strict specification like SOAP. It consumes less bandwidth and resource.
Language and Platform independent: RESTful web services can be written in any programming language and executed in any platform.
Can use SOAP: RESTful web services can use SOAP web services as the implementation.
Permits different data format: RESTful web service permits different data format such as Plain Text, HTML, XML and JSON.
What will cover in this entire course :
What is a Web Service?
What is a RESTful Web Service?
How to implement RESTful Web Services with Spring and Spring Boot in simple steps
Learn through implementing a project
How to design Resources and GET, POST,PUT and DELETE operations?
How to implement Validation for RESTful Web Services
How to implement Exception Handling for RESTful Web Services
What is HATEOAS? How to implement HATEOAS for a Resource
What are the different approach in versioning RESTful Services
How to use Postman to execute RESTful Service Requests
How to implement basic authentication with Spring Security
How to implement filtering for RESTful Services
How to monitor RESTful Services with Spring Boot Actuator
How to document RESTful Web Services with Swagger
How to connect RESTful Services to a backend with JPA
What is a SOAP Web Service
What is WSDL (Web Service Definition Language)
What is SOAP Header, SOAP Body and SOAP Fault?
What is an XSD (XML Schema Definition)
How to write an XSD for your requests and responses using eclipse visual editor
What is JAXB and how to implement them
What is an WSDL Endpoint
How to implement basic level security with WS-Security for SOAP Web Services
What are the different steps in building SOAP Web Services with Spring Web Services & Spring Boot
How to execute SOAP Requests using Wizdler browser plugin
Learn the topics in Spring and Spring Boot:
Spring Boot
Spring Core - IoC
Spring Data JPA
Spring REST
Spring Security
MySql with Rest API