Development notes

Thoughts, notes and ideas about development

How to run Spring Boot and MongoDB in Docker using Docker Compose

Into the previous post How to run Spring Boot and MongoDB in Docker container I described how to start Spring Boot web application and MongoDB in docker using Dockerfiles. Described approach works, but has some drawbacks: we need to remember all commands and repeat them from time to time. Into this tutorial I’ll describe how to build locally a Docker image with Java application and run it together with MongoDB in Docker containers using Docker Compose. Continue reading

How to install Maven on Windows 10

Maven is build tool primary for Java projects. In this tutorial I will describe how to install maven on Windows 10 operating system. Download and install Java To use maven we need to install Java first. If maven is used for Java projects java jdk should be installed, otherwise jre would be enough. Jdk or Jre could be found here. Download maven After Java (jre or jdk) is installed we need to download Apache Maven from official web site https://maven. Continue reading

Java: Ambicious method call

2016-10-30 Java Alexey Bogdanov
Ambicious method call error occurs when Java compiler doesn’t know which of the overloaded method to call. Let’s assume that we have the following overloaded methods: first method accepts the String parameter and prints it. The second method accepts Integer parameter and also prints it. public void print(String param) { System.out.println("Printing parameter + "param" + " as String"); } and public void print(Integer param) { System.out.println("Printing parameter + " + param + " as Integer"); } Calling one of the methods into the following way print(null) will attempt to the error like this: Continue reading