Quantcast
Channel: Forward Everyday
Browsing index pages (90 articles)

Image may be NSFW.
Clik here to view.

Secures your applications with Spring Security 5 and Keycloak

Spring Security 5 brought new OAuth2/OIDC client instead of the legacy client support in the old Spring Security OAuth sub project. The new OAuth2 umbrella modules in the core project will replace the...

View Article


Image may be NSFW.
Clik here to view.

Build a Reactive application with Angular 5 and Spring Boot 2.0

I have created a post to describe Reactive programming supports in Spring 5 and its subprojects, all codes of this article are updated the latest Spring 5 RELEASE, check spring-reactive-sample under my...

View Article


Java EE Security API 1.0: SecurityContext

SecurityContextIn Java EE 7 or earlier versions, other specfications, such as Servelt, EJB, JAX-RS, JAX-WS, etc. have their own specific APIs to query current security context.Servlet -...

View Article

Java EE Security API 1.0: IdentityStore

There are two built-in IdentityStore implementations provided in Glassfish v5, Database or Ldap. An example of using built-in @DatabaseIdentityStoreDefinition to setup database based...

View Article

Java EE Security API 1.0: HTTP authentication

HTTP authenticationHttpAuthenticationMechanism allow customsize your own HTTP authentication mechanism. An examples for custom...

View Article


Servlet 4.0: Http Trailer

Http TrailerServlet 4.0 added Http Trailer(RFC 7230) supports, which is a specific collection of http headers comes after response body. It is useful in some case, such as chunked transfer encoding or...

View Article

Servlet 4.0: Runtime Discovery of Servlet Mappings

Runtime Discovery of Servlet MappingsWhen a servlet is activated, the mapping info can be discoverable at runtime. Described in the Servlet spcefication.The method getHttpServletMapping() on...

View Article

Image may be NSFW.
Clik here to view.

Servlet 4.0: HTTP/2 Server PUSH

Server PushOne highlight feature of HTTP/2 is Server Push. Servlet 4.0 add PushBuilder to handle push. An exmaple of enable Servlet...

View Article


JAX-RS 2.1: Server Sent Event

Server Sent EventJersey itself supports SSE for years, now it is standardized as a part of JAXRS 2.1. A simple SSE example.@Path("events")@RequestScopedpublicclassSseResource...

View Article


JAX-RS 2.1: Reactive Client

Reactive ClientIn JAXRS 2.0, a client to handle async resources looks like.publicclassAsyncClient {publicfinalstaticvoidmain(String[] args) throwsException {WebTarget target...

View Article

JAX-RS 2.1: Async improvements

Async improvementsIn JAXRS 2.0, you can build an asynchronous RESTful APIs as the following.@GETpublicvoid getAsync(final@SuspendedAsyncResponse res) { res.setTimeoutHandler( (ar) -> {...

View Article

JPA 2.2: Support Stream as query result

Support Stream as query resultHibernate has already added a lot of alignments with Java 8, Stream and Optional are supported. JPA 2.2 add official support for Stream result of query. The following...

View Article

JPA 2.2: Java 8 Datetime support

Java 8 Datetime supportIn the former version, there are some approaches to add Java Datetime support by yourself.Custom AttributeConverter, I descirbed here. Spring Data JPA also provides...

View Article


JPA 2.2: More CDI Alignments

More CDI AlignmentsIn JPA 2.1, EntityListener supports @Inject(some persistence providers are still problematic). JPA 2.2 adds injection support in @AttributeConverter. Let's reuse the sample codes in...

View Article

Bean Validation 2.0(JSR380)

Bean Validation 2.0(JSR380)Bean Validation 2.0 added more alignments with Java 8 and CDI, and bring a series of new annotations.Supports Java 8 Datetime and Optional.Supports annotations applied on...

View Article


CDI 2.0: Configurators APIs and Intercept Producers

Configurators APIs and Intercept ProducersIn CDI 2.0, it is possible to add Interceptor to a producer programmaticially. For example, there is a POJO.public class Greeter { public Greeter() { } public...

View Article

CDI 2.0: Register Beans dynamicially

Register Beans dynamiciallyBefore CDI 2.0 register a bean dynamicially is a little complex. CDI 2.0 simple the work.publicvoid addABean(@ObservesAfterBeanDiscovery event) {// get an instance of...

View Article


CDI 2.0: Fire events asynchronously

Fire events asynchronouslyCDI 2.0 add the capability of firing an CDI event asynchronously, this will free the client from long-awaited blocking rquest. Create a simple backing...

View Article

Image may be NSFW.
Clik here to view.

CDI 2.0: Handle Events in desired Priority

Handle Events in desired PriorityIf there are multi CDI @Obsevers emthods defined, in the former CDI, there is no way to ensure they are excuted in a certain order. In CDI 2.0, this gap is filled by...

View Article

CDI 2.0: Java SE support

Java SE supportThe Java SE support in weld is now standardized, it is useful when you want to get CDI support out of Java EE application servers. Given a simple CDI...

View Article
Browsing index pages (90 articles)


Latest Images