Home » Spring Boot

Tag Archives: Spring Boot

Upload files in Spring Boot application using Commons FileUpload

spring-interview-questions-answers

In our previous post, we saw how to upload a file using the Spring framework’s default implementation for MultipartFile interface. In this post, we will see how we can use the Commons FileUpload library and the wrapper implementation CommonsMultipartFile provided by the Spring framework. Update the pom.xml We will update the maven dependencies to include commons-io and commons-fileupload. We will ...

Read More »

Uploading files in Spring Boot application

spring-interview-questions-answers

Uploading files is one of the most common operations in a web application. In this article we will look at how to upload file from an HTML page and copy it to the file system on the server. Creating a HTML form with file upload option The below HTML code and its corresponding Javascript code creates the HTML form and ...

Read More »

Validation in Spring Boot applications

spring-interview-questions-answers

Validation in Spring Boot applications can be done in many different ways. Depending on your requirements some ways might fit better to your application than others. In this post we will explore the usual options to validate data in Spring Boot applications. Validation is done by using the Bean Validation API. The reference implementation for the Bean Validation API is ...

Read More »

Spring Boot for war

spring-interview-questions-answers

Spring Boot supports the following embedded servlet containers: Tomcat Jetty Undertow You can use Maven, Gradle, or Ant/Ivy as build tools to generate the jar file. However, you may need to use your own server as WebLogic, Wildfly, JBoss, etc. In that case, you would need to generate a WAR file of your Spring Boot project. To do that you ...

Read More »

Run method on Spring Boot startup

spring-interview-questions-answers

While developing a spring boot application, sometimes we need to run a method or a piece of code at startup. This code can be anything ranging from, logging certain information to setting up database, cron jobs etc. We cannot just put this code in constructor, because required variables or servies may not be initialized yet. This could lead to null pointers or some ...

Read More »

For gourmets and practioners: pick your flavour of the reactive stack with JAX-RS and Apache CXF

java-interview-questions-answers

When JAX-RS 2.1 specification was released back in 2017, one of its true novelties was the introduction of the reactive API extensions. The industry has acknowledged the importance of the modern programming paradigms and specification essentially mandated the first-class support of the asynchronous and reactive programming for the Client API. But what about the server side? It was not left ...

Read More »

Things that make Spring boot Awesome!

spring-interview-questions-answers

For every Java developer Hibernate, Spring are everyday terms. Although recently there was an addition to this list of ‘Spring-boot’. Nowadays Spring Boot is one of the most used open source frameworks. Hence if you are a java developer you must know about spring boot. In this tutorial we will cover srping boot features in detials. Spring-boot can be used ...

Read More »

Developing a Simple Service with Spring Boot

spring-interview-questions-answers

In this post, I will demonstrate how to create a simple web service using Spring Boot.  This framework makes it almost effortless to develop web services, so long as the appropriate dependencies are in-place.  In this example, I will create a web service that will read the current temperature from a file and make it available to clients via a ...

Read More »