How to enable Json pretty-print rendered | Jackson + SpringBoot + RestApi

For convenience way to debug output data in development with human-readable output format, JavaSampleApproach shows you how to enable Json pretty-print of Jackson library.

Related posts:
Jackson to convert Java Object to/from Json String
How to use @JsonView to serialize/de-serialize and customize JSON format from Java Object

[Continue reading…] “How to enable Json pretty-print rendered | Jackson + SpringBoot + RestApi”

Spring JPA + MySQL + AngularJS example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that uses Spring JPA to interact with MySQL and AngularJS as a front-end technology to make request and receive response.

Related Posts:
How to use Spring JPA with MySQL | Spring Boot
How to integrate Http Angularjs with Spring MVC | Spring Boot

[Continue reading…] “Spring JPA + MySQL + AngularJS example | Spring Boot”

Spring JPA + PostgreSQL + AngularJS example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that uses Spring JPA to interact with PostgreSQL and AngularJS as a front-end technology to make request and receive response.

Related Posts:
How to use Spring JPA with PostgreSQL | Spring Boot
How to integrate Http Angularjs with Spring MVC | Spring Boot

[Continue reading…] “Spring JPA + PostgreSQL + AngularJS example | Spring Boot”

Consume Spring HATEOAS Rest API using AngularJS example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that consumes Spring HATEOAS Rest API using AngularJS.

Related Post:
How to start Spring HATEOAS RestAPI with Spring Boot
Consume Spring HATEOAS Rest API using JQuery Ajax example | Spring Boot
How to integrate Http Angularjs with Spring MVC | Spring Boot

[Continue reading…] “Consume Spring HATEOAS Rest API using AngularJS example | Spring Boot”

Consume Spring HATEOAS Rest API using JQuery Ajax example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that consumes Spring HATEOAS Rest API using JQuery Ajax.

Related Post: Spring HATEOAS Rest API + JQuery Ajax POST/GET example | Spring Boot

[Continue reading…] “Consume Spring HATEOAS Rest API using JQuery Ajax example | Spring Boot”

Spring HATEOAS Rest API + JQuery Ajax POST/GET example | Spring Boot

In this tutorial, JavaSampleApproach shows you a Spring Boot example that uses Spring HATEOAS Rest API with JQuery Ajax.

Related Posts:
How to start Spring HATEOAS RestAPI with Spring Boot
How to integrate JQuery Ajax POST/GET & Spring MVC | Spring Boot
How to start with JSP page and static resources in Spring Boot
Consume Spring HATEOAS Rest API using JQuery Ajax example | Spring Boot

[Continue reading…] “Spring HATEOAS Rest API + JQuery Ajax POST/GET example | Spring Boot”

Spring Boot – CORS Support using XML Config

In previous post, we have created a REST Service with Global CORS Configuration using Java Config. This tutorial will introduce way to define global CORS configuration out of our Controller with XML Config in Spring Boot example.

Related Articles:
Spring CORS example using @CrossOrigin – Spring Boot
Spring Boot – CORS Support using Java Config

[Continue reading…] “Spring Boot – CORS Support using XML Config”

Spring Boot – CORS Support using Java Config

In previous post, we have created a REST Service with Spring CORS integration using @CrossOrigin. This tutorial will introduce way to define global CORS configuration out of our Controller with Java Config in Spring Boot example.

Related Articles:
Spring CORS example using @CrossOrigin – Spring Boot
Spring Boot – CORS Support using XML Config

[Continue reading…] “Spring Boot – CORS Support using Java Config”

Spring CORS example using @CrossOrigin – Spring Boot

Cross-Origin-Resource-Sharing (CORS) is a W3C specification which defines how a browser should be allowed using script to access different origin than the origin it has been served. With CORS, we can specify what kind of cross domain requests are authorized in a flexible way, instead of using some less secured and less powerful hacks like IFRAME or JSONP. In this tutorial, we’re gonna look at way to create a Spring Boot REST service with Spring CORS integration using @CrossOrigin annotation.

Related Articles:
Spring Boot – CORS Support using Java Config
Spring Boot – CORS Support using XML Config

[Continue reading…] “Spring CORS example using @CrossOrigin – Spring Boot”

How to start Spring HATEOAS RestAPI with Spring Boot

Spring HATEOAS project helps to create REST representations that follow HATEOAS (Hypertext as the Engine of Application State) principle. In this article, we’re gonna look at way to build a Rest Service using Spring HATEOAS with Spring Boot.

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

How to integrate SpringBoot with Bootstrap and JQuery

Bootstrap is the most popular front-end framework, includes: HTML, CSS, and JavaScript. So the the tutorial, JavaSampleApproach will guide you through the steps of integrating SpringBoot and Bootstrap + JQuery with 3 approaches:

– Manually download Bootstrap
– Include Bootstrap from a CDN
– Use WebJars

Related articles:
How to integrate JQuery Ajax POST/GET & Spring MVC | Spring Boot
How to integrate Http Angularjs with Spring MVC | Spring Boot

[Continue reading…] “How to integrate SpringBoot with Bootstrap and JQuery”

How to configure Remember-Me authentication by Hash-Based Token Approach

Remember-me authentication is a solution for web sites to remember the identity of a user between sessions. In the tutorial, JavaSampleApppoach will show you way to configure remember-me by Hash-Based Token Approach (Cookie-based tokens) with Spring Boot.
s
Related Articles:
How to configure Persistent Token Remember Me authentication Approach
Spring Security – Config Security for Web MVC by Spring Boot

[Continue reading…] “How to configure Remember-Me authentication by Hash-Based Token Approach”

Spring @RequestAttribute annotation – Spring MVC

Spring 4.3 provides a new @RequestAttribute annotation that helps us access to pre-existing global request attributes (outside the controller). Today we’re gonna look at how to get a HttpServletRequest attribute which is created in an Interceptor using Spring @RequestAttribute annotation.

Related Articles:
How to use SpringMVC HandlerInterceptor with Spring Boot
Spring @SessionAttribute annotation – Spring MVC

[Continue reading…] “Spring @RequestAttribute annotation – Spring MVC”

Spring @SessionAttribute annotation – Spring MVC

Spring 4.3 provides a new @SessionAttribute annotation that helps us access to pre-existing global session attributes (outside the controller). Today we’re gonna look at how to get a HttpSession attribute which is created in an Interceptor using Spring @SessionAttribute annotation.

Related Articles:
How to use SpringMVC HandlerInterceptor with Spring Boot
Spring @RequestAttribute annotation – Spring MVC

[Continue reading…] “Spring @SessionAttribute annotation – Spring MVC”

Spring Bean Scope Annotation: @RequestScope | @SessionScope | @ApplicationScope

Spring Framework new release 4.3 make some Web Improvements. Among that, it simplifies way to implement Bean Scopes (Request, Session and Application scopes) using Annotation: @RequestScope | @SessionScope | @ApplicationScope. They are only valid in the context of a web-aware Application.

Related Articles:
Spring Bean Scope – Singleton and Prototype
Spring Bean Scope using Annotation – Singleton, Prototype, Request, Session, Global Session, Application

[Continue reading…] “Spring Bean Scope Annotation: @RequestScope | @SessionScope | @ApplicationScope”