Table of Contents
Click on a link to jump to that section:
- Functional Specs
- Creating the View
- HTML Mockup
- Thymeleaf Integration
- JavaConfig
- ApplicationContext.java
- SpringDataConfig.java
- ThymeleafConfig.java
- ApplicationInitializer.java
- Layers
- Domain
- Service
- Controller
- Running the application
- Clone from GitHub
- Create the Database
- Run with Maven and Tomcat 7
- Run with Maven and Jetty 8
- Import to Eclipse
- Validate with W3C
Dependencies
These are the main Maven dependencies:
- Spring 3.2.0.RC1
- Spring Data JPA 1.2.0.RELEASE
- Thymeleaf 2.0.14
- Hibernate 3.6.3.Final
- See pom.xml for full details
Required Tools
These are the minimum required tools:
- Git
- Maven 3.0.4
- MySQL
- Eclipse IDE or SpringSource Tool Suite (STS)
GitHub Repository
There are two versions of the application: a JavaConfig-based and an XML config-based app. Both versions are identical in their feature set.
Functional Specs
Our application's requirements are quite straightforward:
- Create a simple form to manage user information
- Provide the following fields: first name, last name, username, role
- Username must be unique
- Provide CRUD operations
- Provide table to view all users
Here's our Use Case diagram:
Here's a screenshot of our working application:
Next
In the next section, we will focus on the view layer. We'll start writing the HTML mockup template; then we'll integrate it with Thymeleaf. Click here to proceed.
Share the joy:
|
Subscribe by reader Subscribe by email Share
Thanks for the nice and comprehensive example.
ReplyDeleteIf possible, please give a sample for Java Config based Spring Security 3.2 or let me know, how to configure Spring Security 3 using Java annotation.
Thanks in advanced....
Rahi, you're welcome. I'm actually on the process of writing a guide that covers the latest Spring Security in a Spring Social app. It uses JavaConfig and no web.xml. Unfortunately, the declaration of the rules (i.e spring-security.xml) will remain in XML because it's easier and less verbose than with JavaConfig.
DeleteYeah...Thanks a lot Mark..Your Spring Social example is very comprehensive and helpful.
DeleteNice example. While playing with it, and incorporating this pagination example
ReplyDeletehttp://www.jiwhiz.com/post/2013/2/Implement_Bootstrap_Pagination_With_SpringData_And_Thymeleaf
I noticed that the users.html template would not update after saving changes when running in STS tcServer (integrated into STS).
For development purposes, you might consider adding "resolver.setCacheable(false);" to the ServletContextTemplateResolver bean definition in your ThymeleafConfig class. The value (true or false) could be externalized to a properties file, so that for dev it would be false; for production, set the property to true.
If you are developing and running in STS and you make changes to the template, you will see the update almost immediately -- much better than restarting the server.
how to display the image using this javaconfig
ReplyDeletethank u for giving this best information..we are offering the best spring online training
ReplyDeletegenerate OAuth keys for Facebook and Twitter (Online Java Training) Generate OAuth keys Java Training in Chennai Consumer key and Consumer secret values: J2EE Training in Chennai
ReplyDeleteHey amazing tutorial!
ReplyDeleteHowever I would strongly suggest to update it to Spring 4 as Spring 3 is obsolete now.
Thanks
David Mayer @ https://www.springmockexams.com/
I have read your blog its very attractive and impressive. I like it your blog.
ReplyDeleteSpring online training Spring online training Spring Hibernate online training Spring Hibernate online training Java online training
spring training in chennai spring hibernate training in chennai
Thanks for your article .its very useful for everyone.Spring and java config was really useful. best aws training in chennai | aws course fees details
ReplyDeleteNice blog. thanks for sharing valuable information. It’s really good.Any one looking software courses. hit the below links
ReplyDeleteBEST SAS BI TRAINING
BEST PTC WINDCHILL TRAINING
BEST ANAPLAN TRAINING
Great article thank you.
Big Data Hadoop Training in Hyderabad
Data Science Course in Hyderabad
AngularJS Training in Hyderabad
Advanced Digital Marketing Training Institute in Hyderabad
awesome article thanks for sharing
ReplyDeletedevops online training
python online traning
power bi online traning
machine learning online course
Very Informative, Thanks for Sharing.
ReplyDeleteDigital Marketing Courses in Hyderabad
SEO Training in Hyderabad Ameerpet
SAP ABAP Training Institute in Hyderabad
Salesforce CRM Training in Hyderabad
Very interesting, good job and thanks for sharing information .Keep on updates.
ReplyDeleteAffiliate Marketing Training in Hyderabad
Online Reputation Management Training in Hyderabad
Email Marketing Course in Hyderabad
E-Commerce Marketing Training in Hyderabad
Hey, it's really nice information to share here. Thanks for your blog, keep posting like this regularly. Thank you!!!
ReplyDeletePMP Training in Chennai | Best PMP Training in Chennai |
Project Management Requirements | PMP Certification Training Courses and Books |
PMP Certification Courses in Velachery & OMR | PMP Certification training in chennai | Project Manager Interview Questions & Answer
Superb! Your blog is incredible. I am delighted with it. Thanks for sharing with me more information.
ReplyDeleteHadoop Training in anna nagar
Big data training in annanagar
hadoop training in OMR
Ethical Hacking Course in OMR
AngularJS Training in T Nagar
hadoop training in T Nagar
SEO Training in Anna Nagar
DOT NET Training in T nagar
This is the exact information I am been searching for, Thanks for sharing the required infos with the clear update and required points. To appreciate this I like to share some useful information.MSBI Training in Bangalore
ReplyDeleteI have to voice my passion for your kindness giving support to those people that should have guidance on this important matter.best SAP MM training in bangalore
ReplyDeleteI really enjoy reading this article.Hope that you would do great in upcoming time.A perfect post.Thanks for sharing.best SAP FICO training in bangalore
ReplyDeleteI must appreciate you for providing such a valuable content for us. This is one amazing piece of article.Helped a lot in increasing my knowledge.best SAP ABAP training in bangalore
ReplyDeleteIt has been great for me to read such great information about devops.devops training
ReplyDeleteExcellent information with unique content and it is very useful to know about the information.salesforce training in bangalore
ReplyDeleteIt is really explainable very well and i got more information from your site.Very much useful for me to understand many concepts and helped me a lot.SAP ABAP Training in Bangalore
ReplyDeleteCongratulations! This is the great things. Thanks to giving the time to share such a nice information.sap s4 hana simple logistics training institutes in bangalore
ReplyDeleteThe Information which you provided is very much useful for Agile Training Learners. Thank You for Sharing Valuable Information.sap s4 hana simple logistics training institutes in bangalore
ReplyDeleteThe Information which you provided is very much useful for Agile Training Learners. Thank You for Sharing Valuable Information.sap s4 hana simple finance training institutes in bangalore
ReplyDeleteInteresting Article
ReplyDeletedigital-marketing-course-in-hyderabad/
digital-marketing-agency-in-hyderabad/
selenium-training-in-hyderabad/
salesforce-training-hyderabad/
microsoft-azure-training-in-hyderabad/
rpa-training-in-hyderabad/
Thanks For sharing a nice post about Oracle Apps Training Course.It is very helpful and Oracle Apps useful for us.
ReplyDeletedigital-marketing-course-in-hyderabad/
digital-marketing-agency-in-hyderabad/
selenium-training-in-hyderabad/
salesforce-training-hyderabad/
microsoft-azure-training-in-hyderabad/
rpa-training-in-hyderabad/
Thanks for sharing such a great blog Keep posting.
ReplyDeletecrm software
company database
india business directory
business directory
b2b data
sales intelligence
CRM software
marketing intelligence
Superb
ReplyDeleteSAP Training in Chennai
SAP ABAP Training in Chennai
SAP Basis Training in Chennai
SAP FICO Training in Chennai
SAP SD Training in Chennai
SAP MM Training in Chennai
SAP PM Training in Chennai
SAP PP Training in Chennai
SAP MDG Training in Chennai
SAP EHS Training in Chennai
Top Chauffeur service in Melbourne
ReplyDeleteWhether you need a last minute chauffeur car or a planned vehicle for your outing, book with us and get served on time. With well-mannered chauffeurs and finest vehicles, we arrange to pick and drop our customers with great punctuality. A hassle-free traveling experience waits at Silver Executive Cab for every customer
I cannot thank lemeridian funding service enough and letting people know how grateful I am for all the assistance that you and your team staff have provided and I look forward to recommending friends and family should they need financial advice or assistance @ 1,9% Rate for Business Loan .Via Contact : . lfdsloans@lemeridianfds.com / lfdsloans@outlook.com. WhatsApp...+ 19893943740. Keep up the great work.
ReplyDeleteThanks, Busarakham.
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
ReplyDeleteblockchain online training
best blockchain online training
top blockchain online training
Internet Business Ideas for 2020
ReplyDeletecomment pega :I just loved your article on the beginners guide to starting a blog.If somebody take this blog article seriously in their life,
ReplyDeletehe/she can earn his living by doing blogging.thank you for thizs article. pega online training
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site
ReplyDeletepega Training in Bangalore
I am inspired with your post writing style & how continuously you describe this topic on anaplan training. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.
ReplyDeleteEnjoy life
ReplyDeletethanks for sharing nice bog keep posting like this https://mulemasters.in/
ReplyDeleteAwesome article! I want people to know just how good this information is in your article.
ReplyDelete