- Udemy: Spring & Hibernate for Beginners (includes Spring Boot)
https://www.udemy.com/course/spring-hibernate-tutorial
- https://hackr.io/tutorials/learn-java-spring-framework
- Library vs Framework
- J2EE vs Spring vs Spring Boot
- Spring Initializr - http://start.spring.io
- Inversion of Control (IoC) & Dependency Injection
- Application Context
- Application Component
- Beans
- Annotation Based Configuration of Components
- Onion Architecture - Controllers, Services, Data access objects
- Server-Wide Configuration with Properties File
- Edge Case: XML Configuration
- Spring Core
- Model
- View
- Controller
- HTML Templates with ThymeLeaf
Data Persistence & Security
- Spring Data JPA
- Hibernate
- Spring Security
Project: Blog Application
Blog application using Spring Boot, Thymeleaf and Spring Data JPA: CRUD
(This project contains pagination, search, filtering and sorting)
In project we make is a basic blog with features of posts and comments. We are skipping authentication for now. However all unauthorized actions or use cases below will be replaced with authentication in next project using spring boot.
This project uses following technologies
- Spring MVC as MVC framework
- Spring Data JPA for Database Connectivity
- Thymeleaf for theming and templates
- Non logged in user should be able to read a list of blog posts that has title, excerpt, author, published DateTime and tags.
- Non logged in user should be able to read full blog post that has title, content, author, published DateTime and tags.
- Non logged in user should be able to filter blog posts using author, published DateTime and tags
- Non logged in user should be able to sort blog posts using the published DateTime
- Non logged in user should be able to search blog posts using full text search on title, content, author and tags
- Non logged in user should be able to navigate to different pages on blog list where each page lists maximum 10 blog posts.
- Non logged in user should be able to create blog post that has title, content, author, published DateTime and tags
- Non logged in user should be able to update a blog post that has title, content, author, published DateTime and tags
- Non logged in user should be able to delete a blog post that has title, content, author, published DateTime and tags
- Non logged in user should be able to comment on blog posts using comment form that contains name, email and comment
- Non logged in user should be able to read, update and delete comments.
- User
- Posts
- id
- title
- excerpt
- content
- author
- published_at
- is_published
- created_at
- updated_at
- tags
- id
- name
- created_at
- updated_at
- post_tags
- post_id
- tag_id
- created_at
- updated_at
- comments
- id
- name
- email
- comment
- post_id
- created_at
- updated_at
- Make the HTML and CSS
- Create database schema / Make database ready
- Start replacing HTML & CSS with thymeleaf
- and connect data with frontend using Spring MVC and Spring Data JPA
- Finish author and tags
- Comments
- Pagination on / in this format for for
- page 1: http://abc.com/?start=1&limit=10
- page 2: http://abc.com/?start=11&limit=10
- page 3: http://abc.com/?start=21&limit=10
- Filters on / in this fomat http://abc.com/?authorId="1"&tagId="1"&tagId="2"
- Sorting on / in this format http://abc.com/?sortField="publishedAt"&order="asc"
- Searching on / in this format http://abc.com/?search="mountblue" search should pick the union of all matches in title, content, tags, author and excerpt.
- Authentication
- Authorization
<input type="hidden" name="postId" value="1" />
[Abc]
Part 2: Authentication & Authorization
Blog application using Spring Boot, Spring Data JPA, Spring Security: Authentication & Authorization
- Thymeleaf
- pagination
- search
- filtering
- sorting
- Authentication and Authorization
In this project we make the same blog that has features like posts and commenting. Additionally we are adding authentication using Spring Security. All unauthorized actions or use cases below will have spring security's authorization feature using various roles.
This project using Spring Boot and uses following technologies of spring boot
- Spring MVC (Spring Boots configuration without XML)
- Spring Data JPA
- Spring Security
- Thymeleaf for theming and templates
- Non logged in user and logged in user should be able to read a list of blog posts that has title, excerpt, author, published date & Time and tags.
- Non logged and logged in user in user should be able to read full blog post that has title, content, author, published date & Time and tags.
- Non logged and logged in user in user should be able to filter blog posts that using author, published date & Time and tags
- Non logged and logged in user should be able to sort blog posts using the published date
- Non logged and logged in user should be able to search blog posts using full text search on title, content, author and tags
- Non logged and logged in user should be able to navigate to different pages on blog list where each page lists maximum 10 blog posts.
- Logged in user with a role of author should be able to create blog post that has title, content, author (disabled and contains his own name), published date & Time and tags.
- Logged user with a role of author should be able to update his own blog posts that has title, content, author (disabled and contains his own name), published date & Time and tags
- Logged in user with a role of author should be able to delete his own blog posts that has title, content, author (disabled and contains his own name), published date & Time and tags
- Non logged and logged in user in user should be able to comment on blog posts using comment form that contains name, email and comment
- Logged in user should be able to update and delete comments made on his own blog posts.
- Logged in user with a role of admin should be able to create blog post that has title, content, author (can be any author), published date & Time and tags.
- Logged in user with a role of admin should be able to update blog post that has title, content, author (can be any author), published date & Time and tags.
- Logged in user with a role of admin should be able to delete blog post that has title, content, author (can be any author), published date & Time and tags.
Part 3: Deployment on Heroku & AWS
Part 4: REST APIs for all features
REST APIs:
- All CRUD operations
- Pagination
- Search
- Filtering
- Sorting
- Authentication and Authorization