
Explore the Spring framework through theory and practice, building two applications, one with Spring and one with Spring Boot, featuring Spring MVC, Spring Data, and Spring Security, plus REST API.
Build a travel agency web app with spring framework, featuring role-based login, tour crud, comments, and validated forms, plus data exchange between two apps via rest and graph communication.
Install Java on Windows by downloading the Oracle JDK, running the installer, and configure JAVA_HOME and PATH so java -version confirms the setup.
Install Maven on Windows by downloading the binary, extracting it into a tools folder, renaming to Maven, and configuring M2_HOME and PATH, then verify with mvn -version.
Install Tomcat on Windows by downloading the binary distribution for Tomcat 9, extracting it, setting CATALINA_HOME, and starting the server to verify via localhost:8080.
Install Eclipse on Windows by downloading the Eclipse installer, selecting the enterprise java developers package, and installing. Set a workspace path and launch Eclipse to begin development.
This lecture guides installing MySQL on Windows, selecting a web installer, and resolving requirements, including the Visual C++ redistributable, then using MySQL Workbench to create travel_agency database and test connection.
Install Java on Ubuntu using the command line, verify with java -version, installOpenJDK 11 JDK via apt-get, and set the JAVA_HOME environment variable to enable Java development.
Install maven on Ubuntu, then verify the installed version to confirm a successful setup by running the version check.
Install tomcat 9 on Linux Ubuntu, download from the official page, move it to a web folder, set CATALINA_HOME, start with startup script, and verify the starter page at localhost:880.
Install Eclipse on Ubuntu by downloading the installer, extracting it, and running the installer. Choose enterprise Java developers edition to access web services tools, set a workspace, and launch Eclipse.
Install and secure MySQL on Ubuntu, create a travel_agency database, and set up a dedicated user with privileges; then install and configure MySQL Workbench to connect to the database.
Explore why Spring became the preferred Java framework, highlighting its lightweight design, modular projects, and reduced boilerplate, plus how inversion of control and dependency injection shift focus to business logic.
Trace the history of Spring and Java EE from Rob Johnson's 2002 book to Spring's 2004 release, and note its lightweight model using plain old Java objects and dependency injection.
Explore how spring framework is a collection of focused projects, from the core container for wiring beans and mvc web apps to spring data, security, and aop.
Explore the Spring container’s core role in creating, wiring, and managing beans, with BeanFactory and ApplicationContext handling resources, events, listeners, and messages.
Explore beans, the objects managed by the Spring IoC container, and learn the six scopes, including the default singleton, prototype, request, session, application, and WebSocket.
Build your spring framework application with a maven project, add spring context dependencies, define a bean in a config class, and compare prototype and singleton scopes via the application context.
Discover inversion of control and dependency injection, where a container manages object lifecycles, scope (singleton or prototype), and bean configuration so you focus on wiring rather than creation.
Explore dependency injection and inversion of control in spring, where the container injects dependencies via constructors. Compare three configuration styles: legacy xml, java configuration, and component scanning.
Define explicit configuration with a class annotated with the configuration annotation, declare @Bean methods to create components, and register beans in the Spring container, naming them via method names.
Compare the traditional object creation with dependency injection using a car engine example. Inject an engine bean into the car via constructor to see HP 200.
Explore implicit configuration by component scanning and annotation-driven bean creation, automatically wiring annotated classes such as controllers, services, and repositories, and customize base packages to scan for large applications.
Explore dependency injection in Spring 5 through component scan and the component annotation, organizing classes into packages and beans. Practice constructor, field, setter, and method injection to wire components.
Learn how the Spring container resolves bean dependencies when multiple beans match a type. Use @Primary, and then @Qualifier to select specific implementations, avoiding no unique bean definition exception.
Master common dependency injection problems in Spring by choosing between multiple engine implementations using primary and qualifier annotations, demonstrated with toy car and off-road car scenarios.
Identify a bean id as a unique name for the spring framework to recognize a bean, typically the method name, with options to customize via the value parameter.
Learn how to read properties into a Spring application using the value annotation or the environment object; configure a properties file and access values with default fallbacks.
Read properties from a properties file in Spring by using a property source annotation, inject values with @Value and Environment, and show defaults when values are missing.
Configure Spring profiles to tailor an application for different environments with environment-specific databases; use the profile annotation so the container creates only beans matching the active or default profile.
Learn how to configure and use Spring profiles to create environment-specific beans, such as standard, development, and production, by defining @Profile beans and toggling the active profile in application properties.
Spring MVC applies the model-view-controller pattern for web apps, using a dispatcher servlet as front controller to route requests and a view resolver with template engines.
Configure the dispatcher servlet in a Spring web app by extending config classes, mapping the entry point, and building a controller to handle requests and forward to views.
Discover how the dispatcher servlet uses request mappings and composed annotations to route requests to the correct controller method, with get mapping and post mapping.
Move data between the controller and the view using the model as a versatile data container. Spring passes model data as request attributes, making it accessible to any view framework.
Select the correct view from the controller name with the view resolver, use the model to build an HDMI or DSP page, and configure the path and suffixes for timely.
Build a travel agency web app with Spring MVC by creating a Maven project, adding Spring Web MVC dependencies, configuring Web MVC, and a home controller with a JSP view.
explain how to handle url parameters in a java spring app using http servlet request and request param annotation, cover missing parameter handling with default values and required flags.
Thymeleaf is a server-side template engine for web and standalone apps, enabling elegant, maintainable templates and integration with Spring via the template resolver, engine, and view resolver.
In this Thymeleaf part 1 lecture, configure Spring Framework 5 web app dependencies and template resolution, create a continent model, and build form handling with a simple in-memory list.
Practice building a Thymeleaf-based web page that lists available tools and provides a tour form with fields for name, continent, start date, duration, all inclusive, and a submit action.
Apply bean validation in spring with hibernate validator to validate user input via annotations such as email, future, min, max, and pattern, and handle errors in the controller.
Implement bean validation in a travel form by adding hibernate validator and applying constraints like not blank, size, pattern, and future dates. Validate with @Valid and BindingResult and show errors.
Move bean validation messages from Java classes to a properties file, configure a message source and validator bean, and validate that errors show from the properties file.
Explore how cascading style sheets determine the appearance of HTML elements, link external CSS files or inline styles, and why the application logic should be separated from description of experience.
Create a resources folder, add a stylesheet, define CSS classes for form and draw with font sizes and color, and link it in the HTML page to apply styles.
Enhance your web app’s appearance by using Bootstrap, either via local files or a Bootstrap CDN, and add simple Bootstrap elements to your HTML.
Explore how to build a view using ready-to-use bootstrap components, including buttons, forms, and responsive grids. Copy bootstrap CDN links, apply containers and layout, and test a responsive tour page.
This lecture explains how databases permanently store application data, contrasts relational databases (RDBMS) with non-relational databases, and compares low-level access to high-level frameworks that simplify data handling.
Explore object relational mapping that links object oriented data to relational databases, with Java Persistence API (JPA) as the standard and Hibernate as a key implementation.
Explore how entities map Java classes to database tables with @Entity, @Table, and @Column, including a no-argument constructor, primary key with @Id/@GeneratedValue, and lifecycle states new, managed, detached, removed.
Configure Hibernate in a Spring web app by adding Maven dependencies, creating database.properties, and wiring a LocalSessionFactoryBean for runtime with UTC.
Master how transactions ensure atomicity and rollback in data operations using Spring's transactional annotation on public methods, covering CRUD operations and Hibernate query language basics.
Create a CRUD by configuring a Hibernate transaction manager and implementing a tour dao with get all, get by id, save/update, and delete operations, wired into the controller and UI.
Divide an application into layers—presentation, controller, service, domain model, and data access object—to separate responsibilities and enable a business logic layer that coordinates data operations with the database.
Implement a travel agency service layer between the controller and DAO by creating a service interface and implementation, annotating with @Service, wiring it in tour controller, and delegating CRUD operations.
Hibernate mappings model database relationships with foreign keys, covering one-to-one, one-to-many, many-to-one, and many-to-many, in unidirectional and bidirectional forms.
Explore one-to-one mappings in Hibernate, linking tours to details via a foreign key and join column, and enable bidirectional access via mapped by.
Learn to implement a one-to-one relationship in a Java Spring Framework 5 web app by creating tour and tour details entities, configuring bidirectional mapping, and building service and repository layers.
Practice one-to-one mapping in a Java Spring web app by creating new details, updating the service and controllers, and building a details page with read-only form fields.
Practice one-to-one part 3 teaches quick UI fixes in a Spring web app: widen forms, adjust navigation, and format dates in tables with the curly brace syntax.
Design a one-to-many and many-to-one relationship between a common table and the comments table, using cascade to automatically delete related comments when the parent is removed.
Compare eager and lazy loading in Java Spring Framework, showing immediate retrieval from the main and related tables versus on-demand access to dependent data, including default mapping types.
Implement one-to-many and many-to-one mappings by creating a comment entity linked to a tool, with JPA annotations, cascade all, and orphan removal; expose it via repository, service, and controller layers.
Explore one-to-many and many-to-one mapping by adding a comment feature: create a form and button on the main page, connect comments to the tour, and verify with Hibernate-generated tables.
Explore one-to-many and many-to-one mappings in Spring, addressing lazy loading and errors with fetch type choices. Load comments with the main object via a join fetch in a single transaction.
Master many-to-many relationships using Hibernate by defining an intermediate join table that connects two entities with annotations, allowing Hibernate to auto-create the schema.
Master a many-to-many mapping between users and tours via a join table using entity annotations, then implement signing in and assigning users to tours.
practice fixes guide students through creating a tour, fixing details when editing, enabling hibernate drop-and-create for database updates, and validating changes via the web app and database tool.
Spring data unifies access to relational and NoSQL databases, speeds up the data layer with repository abstractions and CRUD methods, and enables custom queries via JPQL, native, or method-name queries.
Scale your Spring project by integrating Spring Data, enabling JPA repositories, and creating repository interfaces to replace DAO logic, showcasing CRUD operations through the repository layer.
Explore spring data query methods, implement a date between query to fetch tools for the next 30 days, and wire repository, service, and controller layers for a web app.
Spring security secures applications by enforcing authentication and authorization based on user roles, using servlet filters to control access to actions like adding tools and administrator-only removals.
Learn how to set up spring security step by step by adding config and web dependencies, enabling web security, and configuring authentication via in‑memory or database‑backed user data, with custom queries.
Retrieve user data in a Java Spring app using the principal interface to obtain the login name and roles, and restrict front-end content with Thymeleaf based on authentication.
Add spring security web dependency and a security config using a delegating password encoder. Implement in-memory authentication with a hardcoded user John and password admin, and enable the login page.
the second configure method takes an HTP security object and determines which resources are available to whom, using has any role and perimetral rules, with login redirects and ip restrictions.
Learn how to configure Spring Security, create users with roles, and control login and logout flows, using Thymeleaf extras, a template engine, and dynamic UI elements based on authentication.
Learn how spring security version five provides a ready-to-use login page with minimal config, including login processing, post-login redirects, and logout, plus options to customize and handle bad credentials.
Discover how to build a custom login page in a Java Spring 5 web app, including a login controller, security configuration, and a username/password form.
Override the default Tomcat access denied page with Spring Security. Configure either direct access denied page or a handler, then add a controller method and a custom HTML error page.
Create a forbidden error page for a spring web app, replace tomcat page, and demonstrate approaches—security based access control for admin and employee roles and a custom access denied handler.
Explore how passwords are stored in a special format with encoding types and one-way hashed values, and how login compares user input with the stored hash to authenticate.
Replace hardcoded users with database users, add password and enabled fields, introduce a role model and roles table, configure a data source for authentication, and illustrate password encoding.
Build and validate a sign up workflow in a Java Spring app, including a sign up page, password confirmation, login uniqueness checks, password encoding, and client role assignment.
Configure access to pages using Spring Security, define roles like client, admin, and employee, and implement role-based UI visibility and greetings, with login and sign-in workflows.
Explore representational state transfer and compare it with soap to build and consume rest apis. Learn about endpoints and stateless data transfers using json, xml, or plaintext across independent systems.
Explore how JSON uses key-value pairs, strings in double quotes, and booleans, with objects defined by curly braces, for human- and machine-readable data exchange.
an overview of http methods and status codes, focusing on 2xx success, 4xx client errors, and 5xx server errors, with examples such as 202, 429, and 500.
Explore Richardson maturity model for RESTful APIs from level zero to three, and learn how levels enforce unique resource addresses, HTTP methods, and hypertext as the engine of application state.
Learn to test rest APIs with Postman, a free, intuitive tool for sending, saving, and sharing requests, with easy installation and team collaboration.
Discover how to install Postman, choose between web and desktop versions, and sign in with Google to begin testing your API.
Learn how to test and modify a REST API with Postman by sending get, post, put, and delete requests, configuring URLs, headers, and body data, and inspecting JSON responses.
Add Spring Web MVC and Servlet API dependencies, enable annotation in the configuration, and create an initializer class that extends the annotation-based dispatcher servlet to enable rest.
Configure REST in the Spring framework using MVC by adding required dependencies, enabling web mvc, and implementing the dispatcher servlet initializer to enable REST endpoints.
Explore how RestController simplifies Spring MVC by returning objects directly, automatically serializing to json, and handling producers and consumers for json and xml.
Learn to create your first rest endpoint in Spring, map a hello method to a path, and test the endpoint in a browser with Maven and Tomcat.
Explain marshalling as mapping json to Java objects and back, enabling Spring to transform data between client and server. Note Jackson's object mapper and Spring converters handling json and xml.
Implement a rest controller with the /api path to return all tours from tour service. Test the endpoint in the browser at /api/tools and handle initialization issues by ignoring comments.
Learn how to return not just data but metadata with the response by using the ResponseEntity object, setting headers and status codes to inform clients and indicate errors.
Finish the tour controller using response entity to return tours with http status and headers, implement get all, get by id, save, update, and delete, and test with postman.
Define a custom error class and a global exception handler to return structured error responses in a rest api, including status code, message, and date.
Create a custom error response and not found exception, then implement an exception handler to return a structured 404 with status, message, and timestamp.
Explore using external APIs with Spring by leveraging RestTemplate to map responses to Java objects, and introduce the reactive web client as a future non-blocking alternative.
Explore integrating external APIs to fetch weather data by determining user IP, locating the user, and retrieving weather information from open weather map using a local test flow.
Develop and organize Java model classes for external API responses, including open weather map and ip API data, with getters, setters, toString, and ignore unknown properties during JSON deserialization.
Build a reusable external APIs service in a Java Spring 5 app, implementing getData to fetch city weather via open weather map using rest template and IP logic.
Configure the controller to call an external API service and display weather data on the main page using OpenWeatherMap data, including temperature, humidity, wind speed, and sunrise/sunset times.
Spring Boot automates configuration and server setup, simplifying Java programming, while Springboard eases Spring use; both are starters that streamline development with automatic configuration, actuator, and Tomcat server.
Explore how starters simplify dependency management with springboard starter web, enable automatic configuration, and deploy a web app with an embedded Tomcat, plus actuator for monitoring.
Explore the springboard project structure, including the main start-up class, application context, resources with static and templates, the properties, tests, and the embedded server startup.
Build a Spring web app presenting local offers from a database, integrating offers from the previous app via travel agency api, and configuring model-view-controller, relational data model, security, and rest.
Learn to configure a springboard boot project via the configurator or IDE, manage dependencies like web and time live, fix maven plugin issues, and run with an embedded Tomcat.
Configure and connect a database for a Spring Boot app using Hibernate, create a database and user, set up the datasource in application properties, and run and test the app.
Practice building a Spring Boot Hibernate web app by creating an offer entity, a DTO, repository, service, and controller with get all, save, update, delete, and edit operations.
Build and test a Spring Boot and Hibernate web app by preparing the main offers page and implementing add, edit, and delete operations.
Implement spring boot security by adding the security starter, run the app to log in with the default user, then configure login, main page access, and logout with csrf disabled.
Retrieve items from travel agents using a REST API with Spring Boot, map them to an agency offer model, and test via RestTemplate and a local travel agency app.
Springboard dramatically simplifies programmers' work and enables you to create an advanced configuration for an element, overriding the default one and speeding initial setup while teaching Spring basics.
Complete your Java Spring web app journey by expanding the final project: enhance login, add new functionalities, integrate APIs, and share your results to inspire future learners.
Learn how to download and import a Maven-based source code project into Eclipse, resolve duplicate names, update dependencies, and run travel agency hibernate example on Tomcat to verify it works.
In this course, you will learn what the Spring framework is and how to use it. I will also show you its most important modules.
The entire course is divided into 2 parts: theoretical and practical. In the theoretical part, I will present the key issues from individual modules, and in the practical part, you will practice the acquired knowledge by creating an application.
We'll start with Spring Core, which is Spring's basic module, here you'll learn about the Spring Container, creating the bean, Dependency Injection, and autowiring.
Next, we will discuss Spring MVC, here you will learn how to develop web applications in Spring. I will tell you what is the MVC pattern, how the Dispatcher Servet and View Resolver works. And you will see what is the Thymeleaf and how to use it. I will also show you how to improve the look of the application by adding Bootstrap into it.
In the next chapter, we will discuss relational databases, you will learn how to configure Spring to work with Hibernate, I will also show you the Spring Data module.
In the chapter on Spring Security, we will focus on securing the application, you will learn how this mechanism works, you will learn what is the difference between authorization and authentication, and how to set access to individual resources in the application. You will also see how to configure users in-memory and in the database and how Spring encrypts passwords.
In the next chapter, we will focus on creating a REST API, I will show you here what is REST how to use it to communicate with other applications. In the practical part, we will use 3 external applications to download weather data for the user based on his location.
After all that, we'll move on to the Spring Boot, which is used to simplify the configuration in Spring. In this chapter, you will prepare a second application that will be similar to the previous one and will communicate with it.
During the course, you will prepare two web applications that will use all the discussed modules.
What is very important, during the practical part you will write every single line of code, there will be no situation when suddenly some new code appears in the project. Moreover, after every practical part, you will be able to download source codes for it.
If you have never used Spring and want to learn about it, this course is for you, if you already know the basics of Spring, you will definitely find here a lot of new things that you did not know.
In the course, I am using Spring 5, and Spring Boot, all configurations are created in Java, there is not even a single line of configuration written in XML here.
To understand as much as possible, you should know the Java language. It would be good if you had some basic knowledge of databases and HTML but it is not necessary.
If you dream about starting work as a Java developer working with the Spring framework, this course is definitely for you.