I have published a Java version of the demo I described in this post on GitHub. Everything is the same only the language used for the implementation is changed to Java. So for a description please refer to the linked post.
what’s it all about In this post I show how to implement an annotation-based Logger injection in Spring when writing the application with Kotlin.
The used technique is quite far from new, basically what I do is implement a BeanPostProcessor which scans the properties of the beans for fields annotated with a custom annotation and sets these fields to a Logger instance. Examples how to implement this in Java can be found on the web, here I show the Kotlin version.
Intro In this post I show how to combine some language / frameworks and libraries / tools to build a web-based scalable chat application. I chose the following combination of tools:
Kotlin as implementation language Vaadin for the web-based application Apache Kafka as the message backend Spring-Boot to get all together and running As I am bad in creating cool names for projects I just put together the first letters of the used tools and named this whole thing kovasbak.
When a Spring-Boot application is deployed on OpenShift, it can be reached both with a HTTP URL and a HTTPS URL. This is because OpenShift runs a proxy in front of the application which in case of HTTP just routes the request to the application. If a request comes in via HTTPS, the proxy does all the encryption handling with the client and then passes the decrypted request on to the application – on the HTTP channel – and encrypts the response before sending it to the client.
Note to self: When using Spring-Boot, use application.conf as a base configuration for the needed values. Configuration values for the specific profile go into the application-<profile>.config file.
Profiles are activated by using either the -Dspring.profiles.active=<profile> VM flag or --spring.profiles.active=<profile> commandline arg.
This post describes how to create and deploy a Spring-Boot application to RedHat OpenShift (version 2) when the application is using Java 8.
Edit 2015-10-04: In this newer post I show how to not install a custom JDK. So you should first read this post and then the linked one for additional information.
Normally deploying a Spring-Boot application on OpenShift is not too much pain and is explained in the Spring-Boot documentation.
This post describes how to build a REST service with Spring-Boot that uses Basic-Authentication for several users and that uses the username of the authenticated user to do it’s work. Warning: A service using basic authentication should always use HTTPS as transport protocol, either by running behind a web server proxy or by setting up HTTPS by itself. I’ll cover the latter in a later post.
This might be a setup for a service, where for each user, data is stored in a database, so it not only is necessary to authenticate the user to use the service, but it is also necessary in the service to know which user is accessing the service.
Just a short post to show how easy it is with Vaadin 7 to use server push in an application.
When doing some tasks in a background thread in a Vaadin application, there probably will come the time when some data needs to be shown in the UI. But as these data changes come from background processing, there is no direct possibility to show them in the UI, as UI changes normally are only reflected after a communication roundtrip from client to server to client which happens as a reaction to some user interaction.
When writing a Spring-Boot application it is possible to use your own custom configuration classes which are injected by spring into your application and which are configured in the application.properties file. There is even support for autocomplete support in the properties file editor in IntelliJ IDEA (I suppose there is something similar in Eclipse or NetBeans, but I haven’t tried that). This post shows how to achieve this.
Basically this is used for auto configuration of Spring-Boot components, but can be used in the Spring-Boot application as well.
Recently I wrote an application based on Vaadin Spring-boot, and when I needed to modify the theme of the application I needed to do some research as how to achieve that. I think that at the time the combination of Vaadin and Spring-boot is still pretty new so that information still must be sought. So in this post I describe the necessary steps.
I use the following versions of different tools: