Posts tagged "java"

Create Applications with Angular and Spring Boot Course

Spring Boot and Angular are two technologies that are becoming more and more popular. But combining them can be a little bit challenging, especially for developers familiar with more legacy JavaScript frameworks. That’s why I decided to create a video course that will teach you everything you need to create applications with Angular and Spring… Continue reading

Send emails in Spring Boot

If you are looking for a fast tutorial on how to send emails in Spring Boot applications, then you landed in the right place 😀 1) Add the spring-boot-starter-mail dependency to the pom.xml file <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency> 2) Configure a mail server for testing purposes. I would recommend Mailtrap, a free online service for… Continue reading

Fix Truncation of @PathVariable After Dot in Spring MVC

The Problem Recently, while working on a project I encountered a strange behavior with the path variable binding in Spring controllers. It seems that, by default, the text after the last dot gets truncated in the @PathVariable value. So I decided to share this problem and a solution for it in this post:) Let’s take… Continue reading

Spring Conditional Bean Configuration: Load Beans Based on Application Properties File

In complex applications, there are times when you will want the Spring dependency injector to create an instance of a class based on a given condition. One common case is to configure the bean definition based on a property defined in the file. By using this approach you can load custom beans at runtime… Continue reading

How to deploy Spring Boot applications on Tomcat (as WAR)

By default, Spring-Boot applications are packaged as JAR files and they have an embedded container that hosts them. The embedded container allows developers to not have any web server installed in order to run their apps. This is pretty cool and brings many benefits for developers like easier deployment and management. However, customers usually have… Continue reading

Create a UDP Client-Server in Java Using the Producer Consumer Pattern

In a previous post, I created a simple UDP client-server in Java. While that implementation is perfectly OK, and you can certainly use it in your applications, it does have 2 major pitfalls: The UDP client has more responsibilities than it has to. It listens on UDP for incoming messages, but it also handles their… Continue reading

Create a Simple UDP Client-Server in Java

From my experience, creating networking applications in modern programming languages is not a daunting task anymore. A lot of the complicated details are abstracted in base class libraries. And Java is no exception. In this post, you will see how to create a basic client-server application that communicates via UDP unicast. Without further ado, let’s write some… Continue reading