Project implements ski and snowboard rental service in Spring MVC. See demos here
- User completes registration form.
- Fields are validated, if error occurs user is informed.
- Email is sent with confirmation link.
- When confirmation link is clicked, user account is activated.
- User completes login form.
- Fields are validated, if error occurs user is informed.
- Custom UserDetailsService interface is used for automatic authentication (from Spring Security).
- If authentication is successful user is redirected to proper page, if not user is informed that passed invalid credentials or account is not activated.
- Spring Security
- Password encoding (BCryptPasswordEncoder)
- Using Java configuration (annotations)
- Using JPA repository
- Confirm registration (email verification) - unique, randomly generated token
- Google reCAPTCHA which protects website from spam and bots
- I18N
End with an example of getting some data out of the system or using it for a little demo
Deploy on Apache Tomcat 8.0+
- Java - Java Development Kit 8
- Maven - Dependency Management
- Spring framework - Spring Framework 5.0.4
- Spring Security - Spring Security 5.0.3
- Hibernate - Hibernate 5.2.12.Final
- PostgreSQL - PostgreSQL 10
- Thymeleaf - Thymeleaf 3.0 framework
- Bootstrap - Bootstrap 4.0 framework
- Javax mail - JavaMail API provides classes that model a mail system.
- Jackson - JSON library for Java
- Guava - Google Core Libraries for Java
- X-editable - X-editable in-place editing
- ITextPdf - PDF Generator
Need to be under 'src\main\resources'
-
application.properties
google.recaptcha.key.url=https://www.google.com/recaptcha/api/siteverify google.recaptcha.key.site=site_key_here google.recaptcha.key.secret=secret_key_here
-
hibernate.properties
dataSource.driverClassName=org.postgresql.Driver dataSource.url=jdbc:postgresql://localhost:5555/DBNAME?characterEncoding=utf-8 dataSource.username=DATABASE_USER dataSource.password=DATABASE_PASSWORD hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect hibernate.default_schema=public hibernate.hbm2ddl.auto=update hibernate.show_sql=true
-
email.properties
support.email=snowrentalspring@gmail.com mail.host=smtp.gmail.com mail.port=587 mail.protocol=smtp mail.username=GMAIL_ACCOUNT_USERNAME mail.password=GMAIL_ACCOUNT_PASSWORD
- baeldung.com - Registration - verify user by email
- memorynotfound.com - ReCAPTCHA in Spring app
- nixmash.com - Bootstrap navbar highlighting
- thoughts-on-java.org - Inheritance in Hibernate
- vladmihalcea.com - Hibernate cascade types
- meri-stuff.blogspot.com - JPA relations tutorial
This project is licensed under the MIT License - see the LICENSE.md file for details