Posted In: Spring, Spring Boot, Spring Data

Spring Boot + Spring Data MongoDB + MongoDB – Complexity1

Technologies used 1. Spring Boot 1.5.6 2. Spring data commons 1.13.6 3. Spring data mongodb 1.10.6 4. MongoDB driver 3.4.2 5. MongoDB server 3.4.6 Steps 1. Create Spring Boot starter project or download and import example source project from this link 2. Verify maven pom.xml to have spring-boot-starter, Spring data mongodb, spring-boot-starter-test 3. Add application […]

Read More

Tags:

by , on July 28th, 2017

Posted In: Spring, Spring Boot, Spring Data

Spring Boot + Spring Data JPA + MySQL + Tomcat – Complexity1

Technologies used 1. Spring Boot 1.5.6 2. Spring data commons 1.13.6 3. Spring data jpa 1.11.6 4. MySQL connector 5.1.43 5. Tomcat JDBC 8.5.16 Steps 1. Create Spring Boot starter project 2. Verify maven pom.xml to have spring-boot-starter, spring-boot-starter-data-jpa, mysql-connector-java, spring-boot-starter-test 3. Add application properties 4. Map the POJO properties with Database table columns 5. […]

Read More

Tags:

by , on July 27th, 2017

Posted In: Spring, Spring Boot, Spring MVC

How to handle static content in Spring MVC and Spring Boot

How to exclude static content from being served by Dispatcher Servlet? Spring MVC 1. All requests are set to pass through Dispatcher servlet 2. Create sample app.js file in /WebContent/resources folder. For Maven create JS file in /src/main/webapp/resources 3. Now try accessing following URL http://localhost:90/example/resources/app.js Application will throw 404 error WARNING: No mapping found for […]

Read More

Tags:

by , on July 11th, 2017

Posted In: Spring, Spring Boot

How to run a task periodically in Spring Boot

This class will schedule to run JOB after each hour Another variant with initial delay Variant with CRON like syntax. This JOB/TASK will only run week days

Read More

Tags: Tags:

by , on March 29th, 2017

Posted In: Apache, Spring, Spring Boot, Tomcat

How to increase Spring boot/Tomcat max file upload size

  Change multipart settings in spring boot application.properties   This setting will surely work when you are running it with embedded TOMCAT. Will it work if you create WAR and deploy it to standalone TOMCAT? Answer is YES. I created separate WAR file and tested it in standalone TOMCAT. Setting do work correctly.

Read More

Tags: Tags:

by , on March 5th, 2017

Posted In: Spring, Spring Boot, Spring Security

Example – Spring Boot – Security – Integrating With LDAP – SHA Password

  Example shows how to implement login/logout using LDAP and Spring Boot. Password is encrypted SHA password. It will be authenticated using LdapShaPasswordEncoder     1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step     2. Choose LDAP checkbox or add following maven entry     3a. Add unboundid maven entry for testing with in memory […]

Read More

Tags: Tags: , , , , , ,

by , on February 19th, 2017

Posted In: Spring, Spring Boot, Spring Security

Example – Spring Boot – Security – Integrating With LDAP

    1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step     2. Choose LDAP checkbox or add following maven entry     3a. Add unboundid maven entry for testing with in memory LDAP. Example is using unboundid     3b. Add entry to application.properties     3c. In case you do not want to use […]

Read More

Tags: Tags: , , ,

by , on February 18th, 2017

Posted In: Spring, Spring Boot, Spring Security

Example – Spring Boot – Security – Default Basic Authentication – SSL/HTTPS enabled

  1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step     2. Choose security checkbox or add following maven entry     3. Set up Spring Boot embedded Tomcat to use HTTPS port 8443   3a. Create certificate using following command. Use the same folder as your project E:\workspace_neon>cd Example201721>keytool -genkey -alias tomcat -storetype PKCS12 -keyalg […]

Read More

Tags: Tags: , , , , ,

by , on February 17th, 2017

Posted In: Spring, Spring Boot, Spring Security

Example – Spring Boot – Security – Default Basic Authentication

  Note Basic authentication transmits the password as plain text so it should only really be used over an encrypted transport layer such as HTTPS when used in enterprise application.   1. Create Spring boot project. Refer create-eclipse-spring-boot-application-step-by-step     2. Choose security checkbox or add following maven entry     3. Start spring boot […]

Read More

Tags: Tags: , ,

by , on February 16th, 2017

Posted In: File Upload, Java Script, Spring, Spring Boot

Example – Spring Boot file upload AJAX – Complexity level 2

    Using Spring Boot + Dropzone Example – Spring Boot file upload AJAX – Dropzone     Using Spring Boot + Fineuploader Example – Spring Boot file upload AJAX – Fine Uploader     Using Spring Boot + Plupload Example – Spring Boot file upload AJAX – Plupload     Using Spring Boot + […]

Read More

Tags: Tags: ,

by , on February 10th, 2017