Category: Javaskool Category

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...

Spring Session Example 0

Spring Session Example

Spring Session provides an API and implementations for managing a user’s session information. Spring Session Features Spring Session makes it trivial to support clustered sessions without being tied to an application container specific solution....

Spring for Android Example 0

Spring for Android Example

It helps to simplify the development of native Android applications. Spring for Android is a framework that is designed to provide components of the Spring family of projects for use in Android apps. Like...

Spring Batch Example 0

Spring Batch Example

Spring Batch is a lightweight, comprehensive batch framework designed to enable the development of robust batch applications vital for the daily operations of enterprise systems. Spring Batch provides reusable functions that are essential in...

Spring Boot Multiple Embedded HSQL Database Configuration using gradle 0

Spring Boot Multiple Embedded HSQL Database Configuration using gradle

There are many situations where we require to fetch data from multiple databases and while using JPA sometimes it becomes challenging to create connections with multiple databases through a single application. Hence, in this...

Spring Security SAML Example 0

Spring Security SAML Example

Spring Security SAML Extension allows seamless combination of SAML 2.0 and authentication and federation mechanisms in a single application. All products supporting SAML 2.0 in Identity Provider mode (e.g. Shibboleth, OpenAM, ADFS, Okta, Efecte...

Spring Security OAuth Example 0

Spring Security OAuth Example

Spring Security OAuth provides support for using Spring Security with OAuth (1a) and OAuth2 using standard Spring and Spring Security programming models and configuration idioms. Features Support for OAuth providers and OAuth consumers Oauth...

Spring Security Kerberos Example 0

Spring Security Kerberos Example

Spring Security Kerberos is an extension of Spring Security for application developers to Kerberos concepts with Spring. Spring Security Kerberos Example How to create a spring security project If you want to create your...

Spring Security Introduction and Features 0

Spring Security Introduction and Features

Spring Security is a powerful and highly customizable authentication and access-control framework. It is the de-facto standard for securing Spring-based applications. Spring Security is a framework that focuses on providing both authentication and authorization...

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;...