How to start with Spring Cloud Centralized Configuration

Spring Cloud provides an excellent mechanics to refresh all configured properties of a Spring Bean by @RefreshScope. So in the tutorial, JavaSampleApproach will introduce way to config Spring Cloud Centralized Configuration and the benifits of @RefreshScope.

[Continue reading…] “How to start with Spring Cloud Centralized Configuration”

How to upload MultipartFile with Spring Boot

Upload files to Servlet containers, application need register a MultipartConfigElement class. But Spring Boot makes it more easy by automatically configure it. In How to upload MultipartFile with Spring Boot tutorial, JavaSampleApproach will show you how to upload MultipartFile with Spring Boot.

Related posts:
MultipartFile – SpringBoot + JQuery Ajax + Bootstrap.
MultipartFile – SpringBoot + AngularJs + Bootstrap.
Angular 4 – Upload/Get MultipartFile to/from Spring Boot Server
Angular 4 – Upload/Get Images to/from Spring Boot Server

[Continue reading…] “How to upload MultipartFile with Spring Boot”

How to convert Java Object into/from XML – with Castor & Spring Boot

In the tutorial How to convert Java Object into/from XML, JavaSampleApproach will introduce way to Marshalling & Unmarshalling by an open source XML binding framework Castor with SpringBoot project.

Related Posts:
1. Gson to convert Java Object to/from Json
2. Jackson to convert Java Object to/from Json String

[Continue reading…] “How to convert Java Object into/from XML – with Castor & Spring Boot”

How to work with Spring Callable Controller

Spring Callable Controller is an asynchronized approach of Spring Requests with Servlet 3, it will help to scale a heavy system by releasing container threads while processing expensive tasks. In the How to work with Spring Callable Controller tutorial, JavaSampleApproach will guide you how to work with Spring Callable Controller.

Related Posts:
1. Spring Framework 4.3 New Feature RequestMapping: @GetMapping, @PostMapping, @PutMapping, @DeleteMapping
2. Spring MVC – @RequestMapping with Methods, Headers, Params, @PathVariable and @RequestParam

[Continue reading…] “How to work with Spring Callable Controller”

How to start Spring Async with Spring Boot

For scaling a heavy system, Java provides a mechanics for executing expensive jobs in background with Java Thread Pool & Future to manage the final results. Spring Framework makes it more easy with annotation @Async. In the How to start Spring Async with Spring Boot, JavaSampleApproach will guide you how to build asynchronized services with @Async & Spring Boot.

Related Posts:
1. How to create a Java Thread
2. Java Thread Pool – ExecutorService
3. Spring ThreadPoolTaskExecutor with Callable interface for concurrency programming
4. Java Future

[Continue reading…] “How to start Spring Async with Spring Boot”

How to integrate JQuery Ajax POST/GET & Spring MVC | Spring Boot

In this tutorial How to integrate JQuery Ajax POST/GET & Spring Boot Web Service, JavaSampleApproach will show you how to exchange data between Web client and Spring Boot Web Services.

Related Posts:
How to integrate Http Angularjs & Spring Boot
Spring Web MVC – Spring Form Submission | Spring Boot
Jquery Ajax POST-GET Nested Objects to SpringBoot server

[Continue reading…] “How to integrate JQuery Ajax POST/GET & Spring MVC | Spring Boot”

How to transfer an Image with RestfulAPI – Image RestfulApi

Exchange Images between Client & Server is a common problem in programming. So in the tutorial: How to transfer an Image with RestfulAPI – Image RestfulApi, JavaSampleApproach will guide you how to build a restful Api for exchanging images with Spring Boot & Spring RestTemplate & Java8-Base64

Related posts:
1. How to use Spring RestTemplate client for consuming Restful WebService
2. How to use Java 8 Encode (Decode) an Image to Base64

[Continue reading…] “How to transfer an Image with RestfulAPI – Image RestfulApi”

How to use Spring Batch Restartable Function

SpringBatch provides a restartable mechanics with a Job, in the How to use Spring Batch Restartable Function tutorial, JavaSampleApproach will present to you the principle of this function with SpringBoot.

Related Post:
1. How to configure Spring Batch Step for restart
2. How to start with Spring Batch using Spring Boot – Java Config
3. Spring Batch XML Config by Spring Boot
4. Spring Batch Job with Parallel Steps
5. How to import CSV data to PostgreSQL Database using Spring Batch Job

[Continue reading…] “How to use Spring Batch Restartable Function”

How to build SpringBoot MongoDb RestfulApi

In the tutorial, JavaSampleApproach will show you way to build a SpringBoot MongoDB RestfulApi.

Related Articles:
Spring MongoOperations to access MongoDB
How to use SpringData MongoRepository to interact with MongDB
How to access MySQL database with Spring Data Rest application
How to use HAL Browser with Spring Data Rest | SpringBoot + MySQL

[Continue reading…] “How to build SpringBoot MongoDb RestfulApi”

Spring Framework 4.3 New Feature RequestMapping: @GetMapping, @PostMapping, @PutMapping, @DeleteMapping

Spring Framework 4.3 has some Web improvements. In the article, JavaSampleApproach will introduce you about New Feature RequestMapping: @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, and @PatchMapping.

Related Posts:
Spring MVC – @RequestMapping with Methods, Headers, Params, @PathVariable and @RequestParam
Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example

[Continue reading…] “Spring Framework 4.3 New Feature RequestMapping: @GetMapping, @PostMapping, @PutMapping, @DeleteMapping”

How to configure Spring RestTemplate Security

In the tutorial, JavaSampleApproach will guide you how to configure Spring RestTemplate Security.

Related post: How to use Spring RestTemplate client for consuming Restful WebService

[Continue reading…] “How to configure Spring RestTemplate Security”

How to use Spring JPA MySQL | Spring Boot

In tradition approach, implementing Data Access Layer makes lots of boilerplate of code. Spring JPA is a part of Spring Data, helps us improve our codes and reduce efforts for development and maintenance. Spring JPA supports us the ways to write interface for repositories and custom finder methods, the implementation will be done automatically by Spring Framework.

In the tutorial, JavaSampleApproach will show you way to use Spring JPA MySQL using Spring Boot.

Related articles:
How to use Spring JPA with PostgreSQL | Spring Boot
How to use Spring JPA MariaDB | Spring Boot
How to access MySQL database with Spring Data Rest application
Angular 4 + Spring JPA + MySQL example | Angular 4 Http Client – Spring Boot RestApi Server

[Continue reading…] “How to use Spring JPA MySQL | Spring Boot”

How to configure multi Postgres DataSources with Springboot

In the tutorial, JavaSampleApproach will guide you how to configure multi Postgres DataSources with Spring Boot.

[Continue reading…] “How to configure multi Postgres DataSources with Springboot”

How to use Spring RestTemplate client for consuming Restful WebService

In the tutorial, JavaSampleApproach introduces you a central class RestTemplate that Spring provides for simplified handles restful connection and parsing results.

Related posts:
How to use Spring RestTemplate client for consuming Restful WebService
Spring WebClient with Spring Webflux | SpringBoot 2

[Continue reading…] “How to use Spring RestTemplate client for consuming Restful WebService”

How to create a SpringBoot Gemfire RestfulApi

Spring Data REST provides a mechanics for creating and retrieving an Object from Gemfire storage.
In the article, JavaSampleApproach will introduce you how to create a Gemfire RestfulAPI.

Related Articles:
How to start Embedded Gemfire Application with SpringBoot
Infinispan Cache Solution | Spring Cache | Spring Boot

[Continue reading…] “How to create a SpringBoot Gemfire RestfulApi”

How to integrate Http Angularjs with Spring MVC | Spring Boot

$http is an AngularJS service for communication with remote servers. In the article, JavaSampleApproach will show you way to integrate Http AngularJs and Spring Boot.

Related Articles:
How to configure AngularJs – SpringBoot
How to integrate Angular 4 with SpringBoot Web App and SpringToolSuite
MultipartFile – How to create Spring AngularJs MultipartFile application to download/upload files | SpringBoot + AngularJs + Bootstrap.
AngularJs POST-GET Nested Objects to SpringBoot server
AngularJs POST-GET LIST Objects to SpringBoot server

[Continue reading…] “How to integrate Http Angularjs with Spring MVC | Spring Boot”

How to start Embedded Gemfire Application with SpringBoot

Gemfire is a memory caching solution for scaling software system, JavaSampleApproach will guide you how to create an Embedded Gemfire Application with SpringBoot.

Related article:
Infinispan Cache Solution | Spring Cache | Spring Boot
How to create a SpringBoot Gemfire RestfulApi

[Continue reading…] “How to start Embedded Gemfire Application with SpringBoot”

Spring Boot Unit Test for Spring MVC Controller

Spring provides powerful features to make controller tests by creating request and receiving response without need of deploying code to a web container. This tutorial introduces Spring Boot Unit Test for Spring MVC Controller.

Related posts:
UnitTest – Maven skip test with SpringBoot
@DataJPATest with Spring Boot
How to use Spring JPA MySQL | Spring Boot

[Continue reading…] “Spring Boot Unit Test for Spring MVC Controller”

How to configure AngularJs with Spring MVC | SpringBoot

AngularJS is a JavaScript framework, extends HTML and very strong for Single Page Applications. In the tutorial AngularJs SpringBoot, JavaSampleApproach will guide you how to integrate Angularjs with Spring Boot.

Related articles:
How to integrate Http Angularjs with Spring MVC | Spring Boot
How to integrate Angular 4 with SpringBoot Web App and SpringToolSuite

[Continue reading…] “How to configure AngularJs with Spring MVC | SpringBoot”

Spring Security – Customize Authentication Provider

In the article, JavaSampleApproach will guide you how to customize Authentication Provider with Spring Security support.

Related Articles:
Spring Security – Config Security for Web MVC by Spring Boot
Spring Security – Customize Login Handler
Spring Security Customize Logout Handler
How to use Spring Security JDBC Authentication with PostgreSQL & Spring Boot

[Continue reading…] “Spring Security – Customize Authentication Provider”