Category: Spring Boot

Spring Boot

SpringBoot 0

Spring Cloud interview Questions

What is JWT ? How to implement it using Spring Boot Security? For better understanding we will be developing the project in stagesDevelop a Spring Boot Application to expose a Simple REST GET API...

SpringBoot 0

Spring Boot Interview Questions

What is Spring Boot? Over the years spring has become more and more complex as new functionalities have been added. Just visit the page- https://spring.io/projects and we will see all the spring projects we...

JWT : JSON Web Token 0

JWT : JSON Web Token

JWT is a compact and safe way to transmit data between tow parties. The information can be trusted because it is digitally signed.

SHA -256 Hash in Java Spring boot 0

SHA -256 Hash in Java Spring boot

In Cryptography, SHA is cryptographic hash function which takes input as 20 Bytes and rendered the hash value in hexadecimal number, 40 digits long approx. Message Digest Class:To calculate cryptographic hashing value in Java,...

Spring Boot DataSource Configuration 0

Spring Boot DataSource Configuration

DataSource configuration is provided by configuration properties entries ( spring.datasource.* ) in application.properties file. The properties configuration decouples the configuration from the application code. This way, we can import the datasource configurations from even...

Spring embedded database examples 0

Spring embedded database examples

Let us see how to configure the embedded database engines like HSQL, H2 and Derby in Spring framework. Technologies used : Spring 4.1.6.RELEASE jUnit 4.1.2 Gradle Embedded databases used : HSQLDB 2.3.2 H2 1.4.187...

How to get a reference to currently active dataSource in Spring Boot 0

How to get a reference to currently active dataSource in Spring Boot

Defining DataSource in Spring package com.javaskool.config; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.stream.Collectors; import javax.persistence.EntityManagerFactory; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; //import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;...