NixMash Spring is a Web Bootstrap 3 application demonstrating Spring, Java and supporting web technologies including:
 |  |  |  |
---|---|---|---|
Spring Boot | Spring Data JPA | Spring Solr | Spring Web MVC |
Spring Security | Spring Social | Hibernate | Mockito |
Json | Gradle | Spring Mail | Jsoup |
Multi-Profile Configurations | JPA Auditing | Webjars | Dandelion |
Velocity Templating (pre v.0.4.1) | @PreAuthorize Method Security | REST Templates | RSS View Resolver |
Custom Validators | @Controller Advice | Custom Exception Handling | Tagging with Typeahead |
JPA @NamedQueries and @NamedNativeQueries | JPA Paging and Sorting | Bootstrap3 | Responsive Admin Dashboard |
RSS w/ AbstractRSSView | Thymeleaf | Like Buttons | File Uploading |
MultiFile Upload w/Blueimp | JPA @SqlResultSetMapping and @ConstructorResult | Spring Gradle Dependency Plugin | FreeMarker Templating (v0.4.0+) |
Spring Caching | Spring Batch | AuthenticationFailure Handling |
NixMash Spring has become NixMash Blog Engine and is online at NixMash.com. The GitHub Repository is located here. There is also a WordPress to NixMash Blog Migrator for migrating WordPress blogs to the NixMash Blog Engine. That repository is found here.
The primary purpose for this app is to help fellow developers learn Spring Boot. Each feature in NixMash Spring has one or more companion blog posts at NixMash.com where we go deep on the Cool Tech of the Day. See the list of blog posts on the Release Changelist below.
See the Installation section below on how to configure NixMash Spring to get up and running. Once configured you can build the project in Gradle with a bash script:
project_root>$ install/sh/buildAll.sh
All modules should compile and tests succeed, at which point you can launch the web app with
$ gradle mvc:bootRun
The application has five supporting modules, JPA, Mail, Solr, Batch and Jsoup, each of which can also be executed with $ gradle [module]:bootRun
.
Implementations listed in the Release History below are found in their corresponding branch, v0.0.1, v0.0.2, etc. Newer branches may not contain features found in prior versions.
- v0.5.0 -- Spring Batch Functions, User Registration Updates
- v0.4.5 -- CKEditor and Post Editing Updates
- v0.4.4 -- Spring Caching
- v0.4.3 -- Post Searching with Solr
- v0.4.2 -- Post "Save and Continue" and Post Preview, Post Status and Password Administration Improvements
- v0.4.1 -- Move from Velocity to FreeMarker for support templates
- v0.4.0 -- Spring Boot 1.4.0 and Dependency Upgrades
- v0.3.6 -- Post Add/Edit Moved to Administration
- v0.3.5 -- Posts A-Z, MultiPhoto posts, Flashcard Q&A, User Profile updates
- v0.3.4 -- Post tag cloud, sharing, likes, RSS, title display
- v0.3.3 -- Post WYSIWYG editing, tagging, permalinks
- v0.3.2 -- Initial Posts Feature Release : Jsoup Annotations Framework, Generic Type as Beans
- v0.3.1 -- SiteOptions Properties, GitHub Buttons, Google Analytics : Key-Value to Class Properties, Admin entry of Google Analytics Tracking Id
- v0.3.0 -- Spring Boot 1.3.4, NavBar Submenus : "Demos" menu with Spring JPA and Solr Submenus, Spring Boot 1.3.4
- v0.2.9 -- Site Administration Start, Profile Image Uploads, Email Services : Administrative Dashboard based on Gentella Admin Bootstrap 3 Template. Velocity Java Template Engine for Email formatting
- v0.2.8 -- Spring Social : Integrated Facebook and Twitter Authentication with existing site Spring Security Accounts
- v0.2.7 -- Solr MVC : Web Solr Search, Autocomplete, Web Solr Facet, Solr Location Searching with Google Maps, Highlighting
- v0.2.6 -- Solr Query Samplings : Solr Annotated, Criteria, Method Name Queries, Facet Queries
- v0.2.5 -- Spring Boot 1.3 : Update all libraries to support v1.3
- v0.2.4 -- Multiple Solr Repository Configurations : Four different examples of configuring Solr Repositories
- v0.2.3 -- Initial Solr Release : Embedded and HTTP Solr Server profiles, SimpleSolrRepository CRUD Queries, Spring Annotation Solr Context Configuration
- v0.2.2 -- Eclipse-Friendly NixMash Spring : Project Gradle build and configuration updated to support Eclipse IDE
- v0.2.1 -- Spring MVC and JavaScript Samplings : Bootstrap Dialog Box supporting Spring User Authentication, Spring MVC JSON-Populated Multiselect plugin, SpringLoaded for Hot Reload development
- v0.2.0 -- Spring Data JPA Auditing : Spring JPA Auditing with ZonedDateTime and MySQL support
- v0.1.9 -- More Child Object Handling in MVC and Thymeleaf : Hobbies added to Contact Forms, Custom Data Validation, CommandLineRunner example, Form JUnit Tests
- v0.1.8 -- Child Object Processing (Phones), MVC Method Level Security : PreAuthorize Annotation and Sp-EL MVC Method Security, Thymeleaf Forms
- v0.1.7 -- Full MySQL Support, WAR Deployment : Application deployed as WAR with deployment script, @ControllerAdvice
- v0.1.6 -- Initial Release w/ Spring Security : Spring Security with User Login and Registration, Role-based Contact Details viewing, External Properties file configuration
- v0.1.5 -- Contact Add/Update Form, Dandelion Asset Bundling : Dandelion Asset Bundling, Custom Favicon, Custom Exception Handling and all supporting Tests
- v0.1.4 -- Contact Display, List and Search : jQuery, Bootstrap and Bootswatch Webjars with Spring, Contact web display with Thymeleaf
- v0.1.3 -- Initial release w/ Thymeleaf
- v0.1.2 -- Multi-Module with JPA and MVC Modules : MVC Module added to project, initial HomeController and ContactControllers, Pretty Formatted JSON with Jayway
- v0.1.1 -- @ManyToMany Hobbies added to Contact Model
- v0.1.0 -- @OneToMany Contact Phones added to Contact Model
- v0.0.9 -- Lazy Loading examples
- v0.0.8 -- Multi-database configuration w/ H2Console and MySQL
- v0.0.7 -- Multi-profile configuration : PROD and DEV Spring Profiles
- v0.0.6 -- GUI Generated Entities and Diagram Examples : IntelliJ IDE Persistence Tool Demos
- v0.0.5 -- Hibernate and JPA Module structure
- v0.0.4 -- Initial Release with JPA
- v0.0.3 -- DAO Implementation
- v0.0.2 -- Using Spring Properties : Using Property Files, @Value and @Autowired Environment properties, @ImportResource of app-context.xml demo
- v0.0.1 -- Base Configuration in Spring and Hibernate : Spring Annotation Configuration, Lazy Fetching, Named Queries, Logging, Gradle Build Configuration
- Spring Batch Job where GitHub Repo stats are retrieved every hour and stored in a
github_stats
table from where they're retrieved for display on Home Page - User Email Account domain filtering
- User Registration with Email Validation
- Generating complex HTML, saving it as a static file and loading it at runtime - Posts A-to-Z page
- Post: Avoiding Dynamic Templating for Performance Gains
- Post: The Saga of the Case Insensitive MySQL Table Name
- Post: New User Email Verification with Spring, the Code
- Post: New User Email Verification with Spring, the Process
- Post: Spring Batch Concepts, Part I
- Post: Spring Batch Concepts, Part II
- Post: Spring Batch Concepts, Part III
- Post: Spring Batch Concepts, Part IV
- Post: Fix for MySQL root@localhost Access Denied on New Installs
- Post: A Spring Batch Job For GitHub Repo Stats
- Post: A Spring Validator to Block Email Domains
- Replaced Summernote Editor with CKEditor
- Full support for Code Highlighting
- Fix for Exceptions logged on Administrative Post Edit and Post Update pages
- Cache update modifications to "posts" caches by
postId
andpostName
. All Post properties updated on Post Update.
- Added Spring Caching to Posts Module, GitHub Statistics RestTemplate data
- Fixed exception on displaying GitHub Statistics with RestTemplate when GitHub not available
- Post: Adding Spring Caching
- Post: Safeguarding Your Spring RestTemplate HTTP Operations
- Post: Caching Your Spring RestTemplate Get Operations
- New Post Stream Links Only display
- Spring Boot Updated to 1.4.1-RELEASE, Solr Core to 5.5.3
- Runtime Tomcat libraries removed in favor of Embedded Jetty. (Commented out of
build.gradle
files and easily re-enabled) - "Quick" and "Full" Post Searching with Solr
- Administrative one-click Solr Post Re-index function. Can also run
SOLR
module as JAR to reindex - Post: Handling On/Off Checkbox State with JavaScript and Ajax
- Post: Know Your Spring Boot Embedded Servlet Container
- Post: How to Increase Embedded Tomcat Cache in Spring
- Post: Loading External Static HTML Files in your WAR
- Post: Solr Post Search Overview
v0.4.2 -- Post "Save and Continue" and Post Preview, Post Status and Password Administration Improvements
- Password field added to Administration Create User form
- Administration "Change Password" form
- Improved Post Status controls, can change Published Post to UnPublished Status
- Fixed exception when a MUILTIPHOTO or SINGLEPHOTO post DisplayType selected but no images contained in POST object
- Added PREVIEW button in Admin New Post and Post Update forms
- Added a SAVE AND CONTINUE function to Post Update form
- Bash script for creating all website support folders
- Post: Posting Json with Spring MVC
- Post: Testing Json Posting with Spring Boot JacksonTester
- Post: Possible Solution for Ignored MultiPartFile Locations in Spring Boot 1.4
- All templates and Velocity source replaced with FreeMarker templates and source
- Post: The Move from Velocity to FreeMarker with Spring Boot
- Upgraded to Spring Boot 1.4.0.
- Solr Server and Embedded upgraded to Solr 5.5.2. Supporting scripts in
/install/solr
updated - "Liked Posts" page no longer throws exception if user has no liked posts
- Use of Spring Dependency Management Gradle Plugin to revert to Hibernate 4.3 and apply newest Spring Security libraries
- Post: Upgrading from Spring Boot 1.3.5 to 1.4
- Post: Solr Server Configuration Changes With Spring Boot 1.4
- Post: Securing Solr Server With Jetty
- Post: Using the Spring Dependency Management Gradle Plugin
- All Post Management functions moved to Administration
- New Post List Display in Dandelion Table with Tags and Published Status
- Tag Editing and Deletion
- Link post types no longer lose their Link Display Type properties on Edit
- Post: Five Thymeleaf Format Examples
- Post: Deleting Rows in a Hibernate @ManyToMany Child Table
- Post (NixMash Spring): New Post Administration Screenshots
- Flashcards Q&A feature using Bootstrap Carousel and Post object for multimedia answer content
- Featured Image Post format (Single Photo) with dual role as Flashcard Answer
- Forgot Password with email and User Password Reset
- Posts A-Z page with alphabetic navigation list and grouped posts by first letter of Post Title
- Post "Draft/Published" state enabled and added to Add Post form. Only "Published" posts display in streams
- MultiPhoto Post format
- Multi-Image uploading with the Blueimp jQuery-File-Upload plugin. Added to Posts and Standalone Demo page
- Duncan McDougall's jQuery Lightbox Plugin added to display MultiPost Post images
- Post: Smart Alphabetic Navigation List in Spring and Thymeleaf
- Post: Alphabetically Grouped Output with Spring and Thymeleaf
- Post: Spring MVC, Thymeleaf, and the BlueImp FileUpload Plugin
- Post: The New NixMash Spring MultiPhoto Post Format
- Post: Forgot Password and Password Reset with Spring MVC
- Post: Retrieving @Transient Fields With Spring JPA
- Post: The Pieces of a Flashcards App
- Post: Behind the Pieces of a Flashcards App
- Like Buttons
- Sharing Bookmarks
- Tagcloud
- Display of Message to all users NOT in ROLE_POSTS group on Add Post page
- Affixed Sidebar Menu in Posts
- Post Title Display, also, any tags clicked on when in Title display retrieve post Titles for the Tag
- RSS subscription using Spring
AbstractRssFeedView
superclass for RSS Feed views - Examples of both
@NamedQueries
and@NamedNativeQueries
- Post: Displaying Content in Thymeleaf When User NOT in a Role
- Post: Affixed Sidebar Content in Bootstrap 3
- Post: RSS Feeds with Spring Boot
- Post: Native Sql Queries in Spring JPA
- Post: The Making of a Tag Cloud in Spring
- Post: Share Buttons with Spring, Velocity and Thymeleaf
- Post: Spring JPA @NamedQuery With a Secondary Table Select-In
- Post: Like Buttons From Scratch with Spring
- Post: Pagination and Sorting Spring JPA @NamedQueries
- Post: Conditional CSS Value Assignment with Thymeleaf
- Post: JavaScript Consolidation with Thymeleaf and Spring MVC
- WYSIWYG Editor for Posts and Link Descriptions
- Post Permalink Display Page
- Post Update with WYSIWYG Editing
- Tag creation, post display by tag, typeahead support
- Google Map API updates with configurable GoogleMapKey and local infobox.js for multi-location map fix
- Post: Customizing the Summernote Editor
- Post: More User Friendly Exceptions with Spring Global Errors
- Post: NixMash Spring Post Permalinks and Editing Highlights
- Post: Spring Method Expression-Based Access Control
- Post: Configuring Velocity Tools With Spring Boot
- Post: Using IntelliJ JPA GUI Tools to Create a @ManyToMany
- Post: Post Display by Tag with Spring MVC
- Post: MissingKeyMapError Fix and Other Google Map Revisitations
- Post: Tags With Typeahead in Bootstrap 3
- Jsoup Annotations Framework
- Classes with Generic Types as Beans
- Link Entry and Post Display initial release, multiple display options using Velocity templates
- DATA SCHEMA UPDATE! Added Posts table. See /install/mysql.setup for update scripts
- Post: Application and Testing Context with Multi-Project Dependencies in Spring
- Post: Jsoup Annotations: Introduction
- Post: Jsoup Annotations: Examples
- Post: Configuring a Generic Type Class as a Spring Bean
- Post: Variations on JSON Key-Value Pairs in Spring MVC
- Post: Dysfunctional @Enumerated Annotations in Hibernate
- Post: NixMash Spring Posts: Introduction
- Post: NixMash Spring Posts: Using Jsoup To Create Page Previews
- Post: A Bootstrap Carousel with Spring MVC and Thymeleaf
- Post: Displaying NixMash Spring Posts with Spring MVC and Velocity
- Configurable Google Analytics script and robots.txt file
- GitHub Repository Statistics with Spring RestTemplate, MVC and Thymeleaf. HTML and CSS from Mark Otto's GitHub Buttons
- "SiteOptions" Class Bean with properties generated from Apache Commons BeanUtils reflection
- Demonstrating @PostConstruct and @DependsOn in SiteOptions Bean
- Upgrade to Spring Boot 1.3.5
- DATA SCHEMA UPDATE! Added Site_Options table. See /install/mysql.setup for update scripts
- Post: Serving Up a robots.txt File with Spring MVC
- Post: Serving Up Google Analytics Tracking in Spring and Thymeleaf
- Post: Using Spring Security 4.x Testing Features
- Post: Updating Spring Component Properties at Runtime
- Post: NixMash Spring Administration Area
- Post: Displaying GitHub Stats with Spring RestTemplate and Thymeleaf
- Post: Using @PostConstruct and @DependsOn in Spring
- Post: Working With a Key-Value DataSource in Spring
- Bootstrap3 NavBar Submenus
- Upgrade to Spring Boot 1.3.4, primarily to re-activate DevTools which had a bug in 1.3.3 stopping MySql services on app shutdown
- Email Services with Contact Form page
- Mail Spring Boot Module
- Apache Velocity Template Engine for HTML-formatted MimeMessage Content
- Profile Image Uploading
- Gentelella Bootstrap 3 Admin Template Github
- User Administration and Role Creation, Role Assignment, Role Deletion and removal from User Assignments
- Locked Authentication property to prevent removal and update of essential roles like ADMIN and USER
- Dandelion Datatables in Administration
- Post: SendMail, Velocity and Spring MVC Contact Form JUnit Highlights
- Post: The Spring Dependency Project’s Application.Properties File
- Post: Apache Velocity Email Templates with Spring
- Post: A Spring MVC Contact Form
- Post: Getting Started with Spring Email Services
- Post: Exim4 Configuration Notes for Developers
- Post: Profile Image Uploads: On Image File Storage
- Post: Profile Image Uploads: Thymeleaf Tricks
- Post: Profile Image Uploads: The Spring Parts
- Post: Profile Image Uploads: Intro
- Post: Tracking Down a Bundle NullPointerException in Dandelion
- Post: Using JavaScript with Dandelion Datatables
- Post: Applying User Role Locking
- Post: Querying Object Children in Hibernate
- Post: Using Thymeleaf with JavaScript for Menu Highlighting
- Post: Minimal Dandelion Datatables Spring Boot Configuration
- Google, Facebook and Twitter Sign-In
- Social Services app-id and secret keys configured in
external.properties
file - Social ProviderSignInController SetApplicationUrl() supporting multiple environments.
SetApplicationUrl() set with--appurl
commandline argument. See post Passing Arguments to Spring Boot for details. - SignIn form with @InitBinder and custom validation for all fields
- Removed /webapp and reconfigured for Thymeleaf templates and static content in /resources
- Post: Adding Google Sign-In to Spring Social
- Post: Revisiting a Custom UserConnection JPA Object in Spring Social
- Post: The Case of the Spring Boot CSS Folder 404
- Post: Resolving an H2 Deadlock in Spring Social
- Post: Spring Social Additions to a Spring Security App
- Post: NixMash Spring Social Web Flow Overview, First Pass
- Post: Using External Properties for Spring Social Connection Keys
- Post: Passing Arguments to Spring Boot
- Post: Spring Boot Social Showcase Starting Points
- Post: Facebook Email Access in Spring Boot Social Showcase
- Replaced application-dev.properties/application-prod.properties logic with External Properties file
solr.properties
- Configured for local and public Solr Server Url of http://solr/nixmashspring or a public url
- Updated Solr Index Installation "refreshSolr.sh" script to support new Url logic
- Updated Solr Server to 4.10.4
- Web display of Solr Facets
- Web Solr Search
- Solr Highlighting
- Solr Spatial Searching and Location Data handling
- Display Map with Google Map Javascript API, Thymeleaf and Solr Product Location data
- Post: Pagination with Spring MVC, Solr, Thymeleaf and Bootstrap
- Post: Testing for Malformed Solr Query Strings
- Post: Solr Faceted Search Example in Spring and Thymeleaf
- Post: Solr Search Term Autocomplete with Spring MVC
- Post: Retrieving Location Data with Spring Solr
- Post: Location Queries with Spring Data Solr
- Post: Thymeleaf Conditions, Comma Control and Glyphicons as List Styles
- Post: Using Google Maps API with Thymeleaf and Spring
- Post: A Google Multi-Marker Map Example with Solr, Spring MVC and Thymeleaf
- Post: Highlighted Search Results with Spring Solr
- Tests for CRUD and Custom Solr Queries
- Console demonstrations of Named Method Queries, Java Criteria API, Annotated Queries, Named Queries and Solr Facets
- Post: Simple CRUD Examples With Spring Data Solr
- Post: A Spring Solr Criteria API Query Example
- Post: Spring Solr Named and Annotated Query Examples
- Post: A Named Method Query With A Solr Twist
- Post: Changing the Size of Solr Facet Pages
- Post: Spring Solr Facet Query Examples
- Spring-Boot-1.3.0.RELEASE
- Four different examples of configuring Solr Repositories
-
- Simple @NoRepositoryBean, 2) Derived @NoRepositoryBean, 3) Custom w/ @Repository, 4) SolrFactoryBean Shared Model Repository
- Post: Four Spring Solr Repository Configurations
- New Solr Project based on Solr TechProducts Demo Collection in v5.3.2
- Embedded and HTTP Solr Server configuration (Profiles "dev" and "prod" respectively)
- Solr Data files and script for populating, refreshing Http and Embedded Solr indexes
- Method Name and SimpleSolrRepository base CRUD Queries
- Java Annotation Solr Context Configuration
- Post: On Embedded Solr Paths and Http Solr Server Urls
- Post: Profile-Specific Application.Properties in Spring
- Post: Solr Http and Embedded Data Refresh for Development
- Post: Spring Solr Minimum Daily Configuration Requirements
- Modified Gradle build.gradle files to eliminate Eclipse Build errors
- Added JDK JAVA_HOME properties to root Gradle .properties files
- Updated Gradle Wrapper to v2.7
- Post: Prepping Eclipse Mars for Spring and Gradle
- Post: Loading a Multi-Project Gradle Application in Eclipse
- Bootstrap Dialog Box with requirement to be logged-in to view
- JQuery Bootstrap Multiselect Plugin with Spring MVC JSON-populated Options and postback
- SpringLoaded to Hot Reload Java Class updates w/o app restart
- Post: BootRun Hot Deploy with Spring Loaded in IntelliJ
- Post: JavaScript, Thymeleaf, Spring MVC and a Dialog Box
- Post: Spring MVC, JSON, CSRF, and a Bootstrap Multiselect Plugin
- Post: Populate Bootstrap Multiselect Options with JSON and Spring MVC
- Spring Data JPA Auditing
- Post: Spring JPA Auditing with ZonedDateTime and MySQL
- Post: A Spring War Deployment Bash Script
- Hobbies added to Contact Update Form w/ Custom Data Validation
- Demo of Spring Boot CommandLineRunner
- Contact Form tests added
- Post: Using Spring Boot CommandLineRunner
- Post: Testing Custom Exception Handling Classes in Spring MVC
- Post: Handling Null Radio Button Data in Thymeleaf and Spring MVC
- Add, Update, Remove Contact Phones added to Contact Update form
- User Profile Page with @PreAuthorize to enforce owner-only plus administrator profile view
- Post: Spring MVC Method Security with @PreAuthorize and Sp-EL
- Post: Consistent Fonts with Bootstrap Glyphicon and Thymeleaf
- Post: Object Child Lists in Thymeleaf Forms and Spring MVC
- MySQL Spring Security Support (mysql.setup file now located in /install folder)
- Deployed as a WAR at http://nixmashspring.daveburkevt.com
- @ControllerAdvice firing issue with AddViewControllers() fix
- User Login and Registration Tests
- Post: Why Your @ControllerAdvice May Not Be Firing
- Post: Deploying Your Spring Boot WAR Application
- Post: Adding MySQL Spring Security to Existing H2 App
- Spring Security with Login and User Registration. Supports Multiple Role Assignment with USERS, USER`AUTHORITIES and AUTHORITIES table storage
- H2 Console support at http://site/console. USER Role Access Denied to Console
- User must be authenticated to view Contact Details and Search pages
- External Properties for configuring options based on site public status (is demo site) To Configure Location of Properties File: Set in Jpa/ApplicationSettings.class annotation
- Create Contact Update/Create Submit restricted to ADMIN Role
- Tests for New User Registration and Form Validation
- Note: v0.1.6 supports H2Database only. MySql support to be added.
- Post: Using the H2 Console in Spring and IntelliJ
- Post: Beware Your Spring Security Principal’s Authorities Format
- Post: Spring Security in NixMash Spring App: The Parts You Can See
- Post: Welcome, User! in Thymeleaf and Spring
- Post: Enabling Submit on User Role in Thymeleaf and Spring
- Post: The Old InstanceAlreadyExistsException JUnit Trick
- Post: External Properties File for Spring Web Site Configuration
- Post: Saving Multiple Authorities to Database on New User in Spring
- Post: User Registration Validation in Spring
- Multi-use Contact Add/Update Form
- Fadeout Feedback Messages on Contact Add/Update with jQuery and Handlebars
- Using Dandelion with Asset Bundling to load jQuery-UI datePicker and theme
- Custom Favicon
- Custom Exception Handling and all supporting Tests
- Post: Fadeout Feedback Messages in Spring MVC
- Post: Java Dates, Dandelion, Thymeleaf, Hibernate and Spring
- Post: Using Dandelion with Spring Boot and Thymeleaf
- Post: Testing for 404 and Custom Exceptions in Spring MVC
- Post: Custom 404 Exception Handling in Spring MVC
- Post: Including Webjars in IntelliJ Tomcat WAR Artifact
- Post: Using Your Favorite Favicon in Spring MVC
- jQuery, Bootstrap and Bootswatch Webjars
- Using Bootswatch Webjar with Spring
- Contact Display, List, and Search Form with all supporting Tests
- Post: Adding Bootswatch Webjar in Spring and Thymeleaf
- Post: Bootstrap Navbar Highlighting in Thymeleaf
- Post: Testing a Spring MVC Search Form
- Thymeleaf support added
- Post: Thymeleaf Configuration with Spring Boot
- MVC Module Added
- JPA and MVC Modules wired as single Spring Application
- Referencing Test Source from JPA module in MVC module tests
- Initial HomeController and ContactController classes
- Pretty Formatted JSON output in Web Browser
- Post: Deployable WARs in Spring Boot, IntelliJ and Gradle
- Post: An IntelliJ Multi Module Spring Boot MVC Configuration
- Post: Referencing Test Classes in Another IntelliJ Module
- Post: Pretty Formatted JSON in Spring Web MVC
- Addition of Hobbies, a @ManyToMany Entity with Contacts
- Adding Hobbies dynamically on new and updated Contacts, and as separate process
- Adding and removing Hobbies from Contact
- ContactDTO with Set
- Tests covering above Hobby processes
- Post: Working with the Many in a JPA @ManyToMany
- Examples of Updating, Deleting and Adding records with focus on @OneToMany relationship handling
- ContactDTO now containing Contact and ContactPhone Set
- Builder pattern added to ContactPhone Entity class
- Tests covering Contact updates, deletions and additions, on both contact and multiple contact phones
- Post: Flexible H2 Database Persistence For Testing With Gradle
- Post: Adding a JPA Entity and its @OneToMany Children
- Post: Updating the Many in a JPA @OneToMany
- Several examples of Lazy Loading
- First pass at creating schema DTO objects for use in updating and creating data
- Modified database schema to better adhere to database relationship best practices. Updates are reflected in Entities.
- Post: Approaches to JPA Lazy Loading
- h2database and mySQL JPA Data Configuration
- Profiles based on Enumerator value (ex: JpaDataConfig.MYSQL)
- Post: A Spring JPA Configuration for Multiple Profiles
- ApplicationContext and Data Retrieval Tests
- "Production" and "Dev" Spring Profiles
- Re-architected main() to load context, and a single bean to startup application
- Broke out Production and Dev Profile Configurations, extend base SpringConfiguration class. Plan to redesign further
- Spring Profile set in Gradle.build bootRun task
- Post: Spring-Data GitHub App at v0.0.7 with Profiles
- Post: GetBeans in a Spring Main Method, A Better Way
- Post: Setting Spring Profiles in Gradle
- Generated supplemental Contact, ContactTelDetail and Hobby Entities using the IntelliJ Persistence View GUI tools. (Models now contain "Entity" classname suffix.)
- Output based on new Entities, shown below
- Updated to Spring 4.1.6, Spring-Boot 1.2.3
- Post: GUI Generated Entities for Spring-Data GitHub App v0.0.6
- Post: IntelliJ ER Diagram Relationship Dialogs and the Code They Create
- Post: Using IntelliJ Persistence View and ER Diagram Mapping Tools
- Broke-up the application into two separate IntelliJ Modules
- Root and child Gradle project configuration
- Post: Supporting Multiple Transaction Managers in Spring
- Spring Data JPA Implementation
- Dual SpringJPAConfiguration and SpringHbnConfiguration classes
- Simultaneous use of both Spring Data JPA and Hibernate with Transaction Isolation
- Updated MySQL Schema with additional data
- Shared Model Entities between Hibernate and Spring Data JPA
- Spring 4.0.6, Spring-Boot 1.1.4
- Post: JPA Added to Spring Data GitHub App v0.0.4
- Generic DAO Interface Implementation
- Added Service Facade
- Persistence Tier broken out to Domain Model, Data Access Object and Service Layers
- Data and Output identical to v0.0.1
- Spring 4.0.6, Spring-Boot 1.1.4
- Post: Spring-Data GitHub App at v.0.0.3 with Generic DAO Interface
- Populating DataSource connection from Property File
- Using both @Value and @Autowired Environment properties
- Annotations with @ImportResource of app-context.xml file
- Custom SpringPropertiesUtil Class to retrieve overriden "username" System Property
- Populating @Autowired PropertyClass class properties in @Configuration class and retrieving the properties in another class
- Spring 4.0.6, Spring-Boot 1.1.4
- Post: A Spring Property Handling Exercise
- Post: Spring-Data Demo App v0.0.2 on GitHub
- Changed XML Spring Configuration to Annotations
- Changed datasource from embedded H2 to MySql
- Lazy Fetching
- Named Queries
- Logging Configuration
- Gradle Build Configuration
- Inserting data
- Note: v0.0.1 was created with Spring Boot v1.1.4. Using v1.2.x generates a compile error regarding JPA Entity handling.
- Post: New Spring-Data Demo on GitHub
The application supports an H2 Profile (default) and a MySQL Profile. To run JPA Console app use $gradle jpa:bootRun. To run MVC Web app use $gradle mvc:bootRun. The Tomcat Server Port is set for 9000 (set in the MVC application.properties
file) so go to http://localhost:9000 to view the app in your browser.
To use MySQL run mysqlsetup.sql
script in the /install/sql
directory to populate the database. Update Datasource connection properties in /resources/META-INF/spring/mysql.properties
file. The H2 create-data script for the tests is located in /resources/db.
The JPA, Mail, Solr and Batch Modules use external Property Files which must be configured to compile successfully. To Configure the location of the Properties Files, change the @PropertySource
annotation setting in Jpa/ApplicationSettings.class
and Mail/MailSettings.java.
You can quickly locate these settings by searching "/home/daveburke" in your IDE.
@Component
@PropertySource("file:/home/daveburke/web/nixmashspring/external.properties")
@ConfigurationProperties(prefix="external")
public class ApplicationSettings {
An example of *.properties
files used by the modules are found in the /install/samples
folder. Update the property values for your environment.
Configure Solr as normally on your development machine. Documents are included in /install/solr/docs
and scripts to populate the Solr Url and Embedded Servers located in /install/solr
. Script name: refreshSolr.sh
. It contains additional installation instructions.
The Solr Project demonstrates both Embedded Solr and Http Solr ("dev" and "prod" Profiles respectively.) Configure these in an external solr.properties
file. Same configuration as external.properties and mail.properties files discussed above. Set solr.properties
file location in Solr project common/SolrSettings.java
@PropertySource
value.
You can start by chosing not to include Solr in your application. To do so, remove solr
from the root Gradle settings.gradle
file and from MVC Module's build.gradle
(compile project(':solr')). While in that build.gradle
file you will notice a line to uncomment if you are not using Solr. That is to use Tomcat as your embedded Web Server. Otherwise the app will use the Jetty embedded server as part of the Solr-Core
package dependency.
You will need to create a physical /files
storage area to upload Profile Images. On a WAR deployment (like at http://nixmashspring.daveburkevt.com) you could use Apache2 mod_proxy to support those physical locations. For development at http://localhost:9000
you could create a soft-link to the /files
location. See the NixMash.com post Profile Image Uploads: On Image File Storage for details on creating a soft-link. See Deploying Your Spring Boot WAR Application on adding a /files
alias in Apache2. There are also bash scripts in /install/sh
for creating a build/files
soft-link and all site support directories.
When you've added your external.properties
files, configured MySQL and, optionally, Solr, there is a bash script found in /install/sh
named buildAll.sh which will build each module and run all tests (which should pass), at which point you can run the app in IntelliJ/Eclipse or at the command line:
$ gradle mvc:bootRun
Version 0.0.1 of the app was based on Chapter #7 of Pro Spring, Fourth Edition from Apress, "Using Hibernate." (An excellent book, btw.) Here is the book's listing on Apress. For Safari users, here is the online version of it on Safari.
The Generic DAO structure in Version 0.0.3 was based on Chapter #2 of Spring in Practice by Willie Wheeler and Joshua White, "Data persistence, ORM, and transactions." Here is the Chapter on Safari.
Multiple database JPA Configuration implemented in Version 0.0.8 based largely on the work of Gordon Dickens' Spring-Data-Demos "Profiles" project.
Several components related to Thymeleaf and Security in Version 0.1.x from Arnaldo Piccnelli's Enhanced Pet Clinic.
Petri Kainulainen’s excellent book Spring Data from Packt Publishing and accompanying source code was a reference for Model Attribute handling and feedback messaging in Version 0.1.5 as well as other features.
Two excellent source references for Spring Security which initially appeared in Version 0.1.6 were Rob Winch's gs-spring-security-3.2 something and Bartosz Kielczewski's example-spring-boot-security.
Petri Kainulainen also served as a great reference on Solr in Version 0.2.3. See his excellent Spring Data Solr Tutorial(http://www.petrikainulainen.net/spring-data-solr-tutorial/) on his blog. Another good reference on Solr was Christoph Strobl's spring-data-solr-examples on GitHub.
Spring Framework contributor Christoph Strobl's Spring Data Solr Showcase(https://github.com/christophstrobl/spring-data-solr-showcase) served as the basis of Solr Autocomplete found in Version 0.2.7.
The Social Showcase for Spring Boot Sample Project was helpful in becoming oriented with Spring Social in Version 0.2.8. Petri Kainulainen remains my Go-To Spring Guru, here for Spring Social in his 4-Part Tutorial.
The Administrative Dashboard introduced in Version 0.2.9 is based on the Gentelella Bootstrap Dashboard on GitHub.