-
Spring Boot + Spring data JPA + PostgreSQL
The previous Spring Boot + Spring data JPA will be reused, modify to support PostgreSQL database.
Date: 2019-08-11 View: 1520
-
Spring Boot Log4j 2 example
In this tutorial, we will show you how to use Apache Log4j 2 in Spring Boot framework.
Date: 2019-08-11 View: 1520
-
Spring Boot How to send email via SMTP
In this tutorial, we will show you how to send email via SMTP in Spring Boot.
Date: 2019-08-11 View: 1520
-
Spring Read file from resources folder
In Spring, we can use ClassPathResource or ResourceLoader to get files from classpath easily.
Date: 2019-08-11 View: 1520
-
Spring Boot JDBC Examples
In this tutorial, we will show you how to use Spring Boot JDBC JdbcTemplate and NamedParameterJdbcTemplate.
Date: 2019-08-11 View: 1520
-
Spring Boot JDBC Stored Procedure Examples
In this tutorial, we will show you how to use Spring Boot JDBC SimpleJdbcCall to call a stored procedure and stored function from a Oracle database.
Date: 2019-08-11 View: 1520
-
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Long
Below example, the jdbcTemplate.queryForList returns an object of Integer and we try to convert it into a Long directly:
Date: 2019-08-11 View: 1520
-
Spring JdbcTemplate Handle Large ResultSet
Spring JdbcTemplate example to get a large ResultSet and process it.
Date: 2019-08-11 View: 1520
-
Spring Security + Spring LDAP Authentication Configuration Example
In this tutorial we demonstrate how to Configure Spring Security + Spring LDAP authentication application. We show how to configure spring security and spring LDAP using Java And XML Configuration.
Date: 2019-08-10 View: 1520
-
Spring Boot + Spring Security + Thymeleaf Form Login Example
This tutorial demonstrates how to configure spring-boot, spring-security and thymeleaf with form-login. We secure our web application using spring security form-login. We create a reusable Thymeleaf layout which we can use to create our secured and unsecured pages. When a user accesses a protected resource with insufficient rights we redirect the user to an access-denied page. Finally we create a login page where the user is able to login to the application. And we create a logout link.
Date: 2019-08-10 View: 1520
-
Spring Security Basic Authentication Configuration Example
The following tutorial is about Spring Security Basic Authentication Configuration. We demonstrate this by configuring Spring Security using both Java and XML Configuration. We create a custom authentication entry point which we can use and customize to give the user a custom login error message. We finish with showing how to write some integration tests using Spring MockMvc and JUnit.
Date: 2019-08-10 View: 1520
-
Spring Security Method Level Annotations Example
This tutorial demonstrates how to use Spring Security Method Level Annotations. We can use Spring Security to secure our service layer. We can restrict which roles are able to execute a method by annotating the method with any of spring security annotations or the standard java JSR-250 annotaitons.
Date: 2019-08-10 View: 1520
-
Spring Boot + Spring Security + Hibernate Configuration Example
This tutorial demonstrates how to configure Spring Security Hibernate and Spring Boot. We secure a simple stateless web service using basic authentication. We configure Spring Security using Spring Java and/or XML Configuration. Finally, we write some JUnit Integration Tests with spring-test, h2 in-memory database and MockMvc.
Date: 2019-08-10 View: 1520
-
Spring Security User Registration with Hibernate and Thymeleaf
In this example we show how to create a user registration form with Spring Security, Hibernate and Thymeleaf. We validate the user registration fields with hibernate validator annotations and a custom field matching validator to validate if the email and/or password fields match.
Date: 2019-08-10 View: 1520
-
Spring Security Forgot Password Send Email Reset Password
In this tutorial we demonstrate how to use Spring Security, Spring Boot, Hibernate and Thymeleaf to program a password reset flow by sending the user an email address to verify the reset password procedure. When a user has forgot his password, he is able to request a password reset. The application will generate a unique PasswordResetToken and store it in the database. The user’ll receive an email with the unique token. When he clicks the link, the user is redirected to a page where he can change his password.
Date: 2019-08-10 View: 1520