├── LICENSE.md
├── src
├── main
│ ├── resources
│ │ ├── ValidationMessages.properties
│ │ ├── static
│ │ │ ├── css
│ │ │ │ └── styles.css
│ │ │ └── js
│ │ │ │ └── lib
│ │ │ │ └── bootstrap-3.3.6-dist
│ │ │ │ ├── fonts
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ │ ├── js
│ │ │ │ ├── npm.js
│ │ │ │ └── bootstrap.min.js
│ │ │ │ └── css
│ │ │ │ ├── bootstrap-theme.min.css.map
│ │ │ │ ├── bootstrap-theme.min.css
│ │ │ │ ├── bootstrap-theme.css
│ │ │ │ └── bootstrap-theme.css.map
│ │ ├── application.properties
│ │ └── messages.properties
│ ├── webapp
│ │ └── WEB-INF
│ │ │ └── jsp
│ │ │ ├── home.jsp
│ │ │ ├── admin.jsp
│ │ │ ├── hello.jsp
│ │ │ ├── includes
│ │ │ ├── footer.jsp
│ │ │ └── header.jsp
│ │ │ ├── error.jsp
│ │ │ ├── forgot-password.jsp
│ │ │ ├── user.jsp
│ │ │ ├── reset-password.jsp
│ │ │ ├── signup.jsp
│ │ │ ├── user-edit.jsp
│ │ │ └── login.jsp
│ └── java
│ │ └── com
│ │ └── naturalprogrammer
│ │ └── spring
│ │ └── tutorial
│ │ ├── mail
│ │ ├── MailSender.java
│ │ ├── DemoBean.java
│ │ ├── MockMailSender.java
│ │ ├── MailConfig.java
│ │ └── SmtpMailSender.java
│ │ ├── controllers
│ │ ├── HomeController.java
│ │ ├── MailController.java
│ │ ├── HelloController.java
│ │ ├── SignupController.java
│ │ ├── ForgotPasswordController.java
│ │ ├── ResetPasswordController.java
│ │ └── UserController.java
│ │ ├── dto
│ │ ├── ForgotPasswordForm.java
│ │ └── ResetPasswordForm.java
│ │ ├── repositories
│ │ └── UserRepository.java
│ │ ├── NpSpringTutorialApplication.java
│ │ ├── services
│ │ ├── UserService.java
│ │ ├── UserDetailsServiceImpl.java
│ │ └── UserServiceImpl.java
│ │ ├── validation
│ │ ├── RetypePassword.java
│ │ ├── UniqueEmailValidator.java
│ │ ├── ExistingEmailValidator.java
│ │ ├── Password.java
│ │ ├── UniqueEmail.java
│ │ ├── ExistingEmail.java
│ │ └── RetypePasswordValidator.java
│ │ ├── aop
│ │ └── RequestMonitor.java
│ │ ├── config
│ │ ├── MvcConfig.java
│ │ └── SecurityConfig.java
│ │ ├── util
│ │ └── MyUtil.java
│ │ └── domain
│ │ └── User.java
└── test
│ └── java
│ └── com
│ └── naturalprogrammer
│ └── spring
│ └── tutorial
│ └── NpSpringTutorialApplicationTests.java
├── .gitignore
├── .mvn
└── wrapper
│ ├── maven-wrapper.jar
│ └── maven-wrapper.properties
├── README.md
├── pom.xml
├── mvnw.cmd
└── mvnw
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Apache 2.0
2 |
--------------------------------------------------------------------------------
/src/main/resources/ValidationMessages.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | /.settings/
3 | /.classpath
4 | /.project
5 |
6 |
--------------------------------------------------------------------------------
/src/main/resources/static/css/styles.css:
--------------------------------------------------------------------------------
1 | form .error {
2 | color: #A94442;
3 | }
4 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/naturalprogrammer/np-spring-tutorial/HEAD/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/home.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
2 | <%@include file="includes/header.jsp"%>
3 |
4 | Hello, JSP!
5 |
6 | <%@include file="includes/footer.jsp"%>
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/admin.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
2 | <%@include file="includes/header.jsp"%>
3 |
4 | You are an ADMIN!
5 |
6 | <%@include file="includes/footer.jsp"%>
7 |
--------------------------------------------------------------------------------
/src/main/resources/static/js/lib/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/naturalprogrammer/np-spring-tutorial/HEAD/src/main/resources/static/js/lib/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/src/main/resources/static/js/lib/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/naturalprogrammer/np-spring-tutorial/HEAD/src/main/resources/static/js/lib/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/src/main/resources/static/js/lib/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/naturalprogrammer/np-spring-tutorial/HEAD/src/main/resources/static/js/lib/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/src/main/resources/static/js/lib/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/naturalprogrammer/np-spring-tutorial/HEAD/src/main/resources/static/js/lib/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/hello.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
2 | <%@include file="includes/header.jsp"%>
3 |
4 | , ${name}! Your Id is ${id}.
5 |
6 | <%@include file="includes/footer.jsp"%>
--------------------------------------------------------------------------------
/src/main/java/com/naturalprogrammer/spring/tutorial/mail/MailSender.java:
--------------------------------------------------------------------------------
1 | package com.naturalprogrammer.spring.tutorial.mail;
2 |
3 | import javax.mail.MessagingException;
4 |
5 | public interface MailSender {
6 |
7 | void send(String to, String subject, String body) throws MessagingException;
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/includes/footer.jsp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |