Spring boot index page example

Spring boot index page example

Table of Contents1. OverviewSolution 1: index.html page inside publicSolution 2: index.html page inside staticSolution 3: Using controller Mapping2. Example:2.1 pom.xml2.2 index.html2.3 SpringBootConfig2.4 Output: 1. Overview Every application should require its default…

Spring boot RestTemplate get headers

Spring boot RestTemplate get headers

Spring boot Rest Template is used to call rest service, getForEntity will return ResponseEntity which contains response + response metadata like header information,url ect. ResponseEntity contains response header, Here is an example of Spring boot Resttemplate…

Spring Boot Rest Service Session Example

Spring Boot Rest Service Session Example

Table of Contents1. Overview2. Example2.1 pom.xml2.2 SpringBootConfig2.3 HttpSessionConfig2.4 SpringBooRedisStoreControllerDemo:Step 1: Session Created and Return Header TokenStep 2: Pass token in header request3. References 1. Overview Spring boot provides easy ways…

Spring boot session example using redis

Spring boot session example using redis

Table of Contents1. OverviewRedis Server2. Example2.1 pom.xml2.2 application.properties2.3 SpringBootConfig2.4 HttpSessionConfig2.5 welcome.jsp2.6 Demo:Step 1: Create sessionStep 2: Store session information in browserStep 3: Increment Hit CounterStep 4: Server down but session…