background preloader

Microservices

Facebook Twitter

Example Driven (Self) Development. Goal of this example This example shows how to create a “microservice ecosystem” from multiple dockerized spring boot applications that see each other, but only one of them is accessible outside of docker.

Example Driven (Self) Development

This is a common approach in a microservice architecture where the API Gateway is the only externally available service that proxies all other intertnal services. Inside the “ecosystem” the number or running instances can change dynamically. Such a dockerized ecosystem can be used for Setting up a local test environment of a microservice projectTesting different cluster configurationsTesting cluster fail-over We will build the following : Spring Cloud Series - Integration Testing using Spring Boot, Postgres and Docker. This post has been featured on baeldung.com/java-web-weekly-137 and petrikainulainen.net/weekly/java-testing-weekly-32-2016.

Spring Cloud Series - Integration Testing using Spring Boot, Postgres and Docker

The integration testing goal is to verify that interaction between different parts of the system work well. Consider this simple example: ...public class ActorDaoIT { @Autowired private ActorDao actorDao; @Test public void shouldHave200Actors() { Assert.assertThat(this.actorDao.count(), Matchers.equalTo(200L)); } @Test public void shouldCreateAnActor() { Actor actor = new Actor(); actor.setFirstName("First"); actor.setLastName("Last"); actor.setLastUpdate(new Date()); Actor created = this.actorDao.save(actor); ... }...} Successful run of this integration test validates that: Class attribute actorDao is found in the dependency injection container. This trivial integration test is taking care of possible issues that unit testing wouldn’t be able to find. GitHub - nielsutrecht/jwt-angular-spring: JSON Web Token example that integrates both a Spring backend with an AngularJS frontend.

Building a secure REST API with Spring Data REST and Java 8. REST APIs are a great interface for both, backend-to-backend communication and the quite popular Single Page Applications (SPAs).

Building a secure REST API with Spring Data REST and Java 8

At techdev, we built trackr, our own tool to track our working times, vacation requests, travel expenses, invoices and more. It’s an AngularJS application with a Java 8 and Spring 4 powered backend. The API is secured via OAuth2. If you’re interested, trackr is open source and the code is available here (backend) and here (frontend). SEE ALSO: How to export data from REST Frameworks like Ruby On Rails, Play etc. allow rapid development of modern web applications. Why Spring? From time to time I read statements on how Spring is too “enterprisy” and is all about some giant XML file, AbstractSingletonProxyFactorys and so on.

Additionally it provides an almost insane amount of functionality that may arise in your applications, including messaging, scheduling or batch processing. OAuth and OpenID Connect for Microservices. Tutorial · Spring Security and Angular JS. In this section we continue our discussion of how to use Spring Security with Angular JS in a "single page application".

Tutorial · Spring Security and Angular JS

Here we show how to modularize the client-side code, and how to use "nice" URL paths without the fragment notation (e.g. "/#/login") which Angular uses by default, but most users dislike. This is the seventh section of a tutorial, and you can catch up on the basic building blocks of the application or build it from scratch by reading the first section, or you can just go straight to the source code in Github. We will be able to tidy up a lot of loose ends from the JavaScript code of the rest of this series, and at the same time show how it can fit very snugly against a backend server built from Spring Security and Spring Boot. Breaking up the Application The sample application that we worked with so far in this series was trivial enough that we could get away with a single JavaScript source file for the whole thing. Microservice-security. Dave Syer, 2014 Twitter: @david_syer Email: dsyer@pivotal.io.

microservice-security

Microservices Architecture for Spring on Cloud Foundry. GitHub - pks1976/spring-boot-microservices: Spring Boot Template for Micro services Architecture - Show cases how to use Zuul for API Gateway, Spring OAuth 2.0 as Auth Server, Multiple Resource (Web Services) Servers, Angular Web App, Eureka dor registrat. Part 1 Cloud Micro Services with Spring Cloud By Mohamed Youssfi.

Cloud native apps

Introduction to Microservices. Microservices are currently getting a lot of attention: articles, blogs, discussions on social media, and conference presentations. They are rapidly heading towards the peak of inflated expectations on the Gartner Hype cycle. At the same time, there are skeptics in the software community who dismiss microservices as nothing new. Naysayers claim that the idea is just a rebranding of SOA. However, despite both the hype and the skepticism, the Microservices Architecture pattern has significant benefits – especially when it comes to enabling the agile development and delivery of complex enterprise applications. This blog post is the first in a seven-part series about designing, building, and deploying microservices.

Editor’s note – This seven-part series of articles is now complete: Let’s first look at why you should consider using microservices. Building Monolithic Applications Despite having a logically modular architecture, the application is packaged and deployed as a monolith. Summary.