Lightweight Java microservice frameworks/libraries

This is primarily a personal todo list of Java-based microservice frameworks to investigate. If I’ve already looked at any of these then I most likely have a separate post about them elsewhere.

As I investigate each of these, you may find implementation examples as part of this Git repo here (https://github.com/kevinhooke/JavaRESTFrameworkComparison) – check the readme in the repo for those which I’ve built examples already.

Libraries and Frameworks:

Useful/Interesting REST and microservice related articles:

Using the Spring Boot CLI (or Spring Initializr) to init a Jersey JAX-RS app

To use the Spring Boot CLI to init an app using Jersey JAX-RS apis, use:

spring init --build=maven --dependencies=jersey --packaging=jar SpringBootREST.zip

Unzip the packaged app, import into your IDE.

To get Spring Boot to initialize Jersey and see your annotated resources,¬†you need to add a Spring component that extends Jersey’s ResourceConfig class, and call register() for each of your Resources (seems odd that you need to explicitly register your endpoints like this, as in a War deployed to a Servlet container they would get found automatically?)

[code]
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.stereotype.Component;

@Component
public class JerseyExampleConfig extends ResourceConfig {

public JerseyExampleConfig() {
register(SimpleResource.class);
}

}
[/code]

Additionally, each Resource endpoint class needs to be @Component annotated so Spring can managed them.

Your JAX-RS resources classes other than above are implemented as normal.