This post shows a sample Spring MVC application developed with Spring Boot, Kotlin, and Thymeleaf. Generally speaking, it is now possible and safe to port your Java-based Spring MVC application codes to Kotlin or start writing new Spring MVC applications in Kotlin already.
Spring Boot – Access Spring ApplicationContext in JUnit Tests
This post shows how to access the Spring ApplicationContext object in JUnit tests. Now, why would we want to do that? Well, sometimes, we need to work directly with the ApplicationContext object. Spring, Java, and Other Requirements We used the
Trim String Values From Properties Files in Spring Boot
This post demonstrates how to trim string values from .properties files using SpringApplicationBuilder and a subclass of or anonymous class of StandardEnvironment supplied to the builder with overridden getProperty(String) and getProperty(String, String) methods.
Validate Properties Files At Startup in Spring Boot
A .properties file contains lines of string pair. Each string pair consists of a parameter name (called the key), and parameter value. This post is about how to validate the parameter value at the application startup.
IBM Bluemix, Cloud Foundry, DevOps, and Spring Boot
In this post, we’ll show how to build, and deploy Spring Boot applications in IBM Bluemix using DevOps,
Spring Boot Asynchronous Controller Without External Queues
This post shows how to create an asynchronous web controller or endpoint in Spring Boot (or Spring in general). The codes won’t use external queues of any kind. However, they’ll use ThreadPoolTaskExecutor to run codes in the background without having
Spring Framework Basic AOP Example
AOP is one of those things in the Spring Framework that we might not need, even for basic implementation, which we have an example for in this post. But we should always consider using Spring AOP whenever possible to have
Spring MVC PathVariable Annotation
Sometimes we want to send values to our web application as the path of the URL (or URI) path. For example, /tenants/123 where value 123 represents a tenant Id. To independently access the value in Spring MVC, we use the
Using Spring Autowired in Kotlin
This post shows an example of how to use @Autowired to inject @Service object in @Controller object Kotlin.
JSqlServerBulkInsert with Spring JDBC Connection is Closed
When we use JSqlServerBulkInsert, we provide a database connection from the pool to bulk insert data even in Spring JDBC. As a result, it might not work well with Spring. Either we could get “Connection is Closed” errors or cause