Posts

Showing posts from October, 2020

API Test Technique - HTTP client support in JetBeans IDEs

Image
  It's common to use a HTTP request client to test API, and you might be familiar with tools like Postman. In this article, I'm going to introduce a more developer-friendly tool available in JetBeans IDEs.  1. Create HTTP request files We just need to create a scratch file with filename extension  http , and JetBeans IDE has native support with it,  as shown below. Then we can write a http request conveniently, and we can add and modify headers and http body easily. Make sure there is a new line separating the headers and the body. 2. Convert cURL requests This feature is really cool. We can copy out a cURL request from browser developer tools and then paste into the .http file, and it will be converted on the fly.

Build J2EE micro services architecture by using Spring Boot, Spring Cloud, Spring Security OAuth2, KeyCloak

Image
I posted an  article  in regards to single page application(UI), but in this post I'm going to introduce how to build micro service architecture for J2EE application with Spring framework and open source SSO framework  Keycloak . This post will cover the following aspects: Keycloak setup Eureka service registration and discovery Spring Cloud API gateway Spring Security (OAuth2 login) and the integration with Keycloak Micro services The code is available in my Github and please check the docker-compose.yml at first so that you can read the rest of the post easier. One thing I need to mention here is you need to replace the ip address of keycloak server url with your own before running the docker containers. YAML   1 version : '3.4' 2 services : 3 api-gateway : 4   build : 5     context : ./api-gateway 6   ports : 7     - "8080:8080" 8   restart : on-failure 9   environment : 10       #overriding spr...