-
Notifications
You must be signed in to change notification settings - Fork 88
Home
[Under construction!]
Welcome to the Cave of Programming resources page. Here you can find source code for the projects in the course -- just scroll down a bit.
The source code linked to on this page accompanies the video course Learn Spring Boot: Create a Social Network, but if you've just stumbled on this page by mistake, feel free to browse and use the code in whatever way you like.
This course is so long and I've taken so long to finish it, that a few annotations have got deprecated while I've still been creating it. I plan to fix that, but meanwhile, here's my very latest, up-to-date code.
For other tutorials and information, Spring.io is absolutely fantastic -- I referred to it constantly while creating this course.
This course is still under construction, but as of 18th February 2018, I've written enough source code to begin to add the final videos to the course. You can find a site I've created using the code from the course here: OtherFreaks.com
Following is the source code for the course; each section of the course has at least the source code as it was by the time I finished working on the section, so when you look at source code for earlier videos in a particular section you're liable to find code in there that you don't actually see in the video course until the end of the section.
If you're handy with the command line and you've installed git, you can clone the entire code repository to your computer by typing
git clone https://github.com/caveofprogramming/springboot
The complete repository can be browsed online here.
-
Prerequisites
-
Installing Software
-
Creating a Maven Spring Boot Project
-
Template Engines
-
Generating a Project Without Eclipse
- Static Resources - Bootstrap
- Adding a Bootstrap Navbar
- Styling the Navbar
- Setting the Context Root
- The Bootstrap Grid
- Bootstrap Panels
- Adding a HTML Form
- JUnit
- MySQL Databases
- Creating a MySQL User
- Connecting to MySQL
- Creating a Domain Object
- Using JPA
- Using CrudRepository
- Retrieving the Most Recent Status Object
Adding a Service Layer
Model and View
Spring Form Tags
Displaying Data
Formatting Dates
JSPs, Objects and Classes
Model Attributes
Refreshing and Updating
Validating Forms
Customising Validation Messages
About Paging
Getting URL Parameters
Getting Pages of Results
Outputting Pages
Formatting the Status Updates
Outputting Page Numbers
Custom Tags
Cycling Through Page Blocks
Displaying Page Number Blocks
Fixing the Block Hyperlinks and Separator
Jumping to the First Page of Blocks
What If There Is Only One Page
Redirecting
Editing the Home Page
Javascript Visual Editors
Dropdown Menus
Adding Edit and Delete Links
Deleting Status Updates
Displaying Statuses for Editing
Saving Edits
Adding Spring Security
Conditional Formatting
Additional Security Rules
Adding a Login Form
Authentication
Login Error Messages
Logging Out
The Security Taglib
The User Domain Object
The User Service
The User Service
Configuring the User Service
Registration Forms
Making Registration Work
Password Encryption
Using Roles
Restricting Urls on Roles
Validating the Email Address
Validating the Password
Adding Custom Validation
Custom Validaton Annotation
Adding the Password Match Constraint
Fake Smtp Test Services
Configuring a Mail Sender
Creating a Mail Service
Testing Mail Sending
Sending as HTML
Creating a Verify Email Page
Adding Thymeleaf Support
Creating a Thymeleaf Template
Configuring Thymeleaf
Rendering the Thymeleaf Template
[Obsolete -- will be removed soon; please skip this video] Creating a Velocity Template
[Obsolete -- will be removed soon; please skip this video] Rendering Velocity Templates
Disabling Users
Storing Verification Tokens
Updating a User
A VerificationDao
Token User Service Methods
Creating a Message page
Invalid User and Expired Token Pages
Creating the Verification Link
[Obsolete -- will be removed soon. Please skip this video] Creating the Verfication Link
Implementing Verification
Deleting Used Tokens
Asynchronous Methods
Tightening the Security Rules
Handling 403 Forbidden
Adding an Access Denied Page
Handling Exceptions
Creating an Error Page
Handling Duplicate Users
Adding a Profile Link
Retrieving the Logged in Username
Creating a Profile Domain Object
Adding a Profile Page
Adding Profile Text
Styling the Profile
The Profile DAO
The Profile Service
Ensuring Privacy in Domain Objects
Getting the Current User
Creating Profiles
Displaying Profile Text
The Edit About JSP
Viewing the Edit About Page
Updating Profile About Text
Validating the Profile
Adding a Policy Factory
Sanitising the HTML
About Uploading Files
Creating an Upload Form
The Upload Directory
File Upload Code
Handling Errors
Getting File Extensions
Checking Extensions
Testing Private Methods with Reflection
Testing isImageExtension
Creating a Random Subdirectory
Testing Directory Creation
Defining an Exception
Creating an Image Save Method
Uploading Photos
Transferring File Information
Getting File Information
Storing File Information
Locating the Default Avatar
Return the Full Photo Path
Serving the Photo
Using the Photo
Deleting Old Photos
Ensuring Name Uniqueness
Structuring the Resize Code
Resizing the Profile Photo
Translating Upload Status
Returning Data from a Method
Running Javascript
Invoking the File Chooser
Submitting the Form Automatically
Intercepting Form Submission
Uploading Data with Javascript
Returning Http Status Codes
Dynamically Refreshing the Image
Adding a Status Message
Displaying the Status Message
Removing the Unwanted Form
Method Based Security
Refactoring the Show Profile Code
Using Path Variables
Viewing Other Profiles
Getting Profile-Specific Photos
Using the User ID in the Profile
Defining an Interest
Interest Service and Dao
Many to Many
About Cascading and Ordering
Saving Interests
Merging and Copying
Modifying Classes for Testing
Creating a Profile Test Class
Implementing the Profile Interest Test
Fetch Types and Proxies
A REST Method for Saving Interests
A REST Method for Deleting Interests
Test Config for Testing Controller Methods
Mocking Users
Mocking a Post Request
Finishing the REST Tests
Javascript Tagging Libraries
Including CSS and Javascript for Tagging
Invoking the Tagging Library
Inspecting Generated HTML
Styling Interest Tags
Configuring Tagging
Dealing with CSRF in Javascript
Setting POST Headers
Implementing the Ajax Post
Outputting the Interest List
Removing Autocomplete Text
Making Profiles Read Only
About Searching
Adding a Search Box
Styling the Search Box
A Search Controller
Collecting Names
Fixing Tests
Mocking Data
Test Data
Creating a Stream
Stream Operations
Mock Users
Saving the Test Data
Performing the Search
About Data Leakage and Layers
Reorganising the Model Packages
The SearchResult DTO
Stream Mapping
The List of Results
Formatting the Results Page
Adding Photos
Rearranging the Results
Linking to Profiles
Adding a Register Prompt
CSS for the Results
Clickable Interests
Improving Searching
More About Paging
Checking Paging Functionality
Using the Debugger
Adding a Page Number Parameter
Implementing Basic Paging
Testing Out Basic Paging
Converting from Lists to Pages
Adding the Pagination Tag
Tweaking the Pagination Tag
Sending Search Data to the Results Page
Using the JSTL Contains Function
Applying the Final Pagination Fix
Adjusting Page Numbers and Results
Source Code