9

A framework based on Spring MVC, Twitter Bootstrap, Thymeleaf, Spring Security –...

 3 years ago
source link: https://marco.dev/2013/08/04/a-framework-based-on-spring-mvc-twitter-bootstrap-thymeleaf-spring-security-part-1-introduction/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

java-version.com: What's new in Java 16? 15? Keep up to date!

A framework based on Spring MVC, Twitter Bootstrap, Thymeleaf, Spring Security – Part 1 – Introduction

Updated December 08, 2013

In few articles I’ll describe how to integrate Spring MVC with Bootstrap, Thymeleaf, Spring Security, Dandelion, JPA, etc.

I started to develop a small framework with the goal to allow developers to start a new web application quickly.

The target features of the framework are:

  • user security
  • user authentication, password reset, …
  • jquery datatables</>
  • document management (upload, …)
  • bootstrap
  • thymeleaf templating
  • extention

The base framework is here: https://github.com/marco76/geniweb (old version based on xml)

The base framework is here: https://github.com/marco76/basicMVC (version based on annotations)

I use this framework for my personal projects and it’s in alpha phase. It’s not intended for production use (yet), but you can use it to see how these technologies integrates together.

On the top of the framework (a jar + some config files) you have the possibility to build your own application.

Here is the example of the result without almost any effort.

Framework1

The web application allows some pages to be accessible to anonymous users and other pages to be accessible only to recorded users.

New users have the possibility of ‘signup’ (with or without reCaptcha) …

signup

and receive an email (generated by velocity) to verify the e-mail address

mail

If the user click on the activation his account is created in the database and automatically logged in.

logged

Some of the features:

  • I added an asyncExecutor to avoid to block the application during the sending of mails
  • The template resolver/engine used is the one of Thymeleaf
  • DataTableDialect allows the use of the library Dandelion (wrapper of JQuery datatables)
  • SpringSecurityDialect allows the integration of SpringSecurity with Thymeleaf
  • CommonsMultipartResolver: used to upload files
  • Embedded database to use the solution out-of-the-box in dev mode
  • Logback logging
  • Tomcat and Jetty (Embedded) support

Author

Marco Molteni

Marco Molteni Blog


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK