{"id":12557,"date":"2025-08-18T09:00:00","date_gmt":"2025-08-18T07:00:00","guid":{"rendered":"https:\/\/wata.es\/?p=12557"},"modified":"2025-06-06T15:41:01","modified_gmt":"2025-06-06T13:41:01","slug":"using-spring-boot-to-set-up-a-rest-application-server","status":"publish","type":"post","link":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/","title":{"rendered":"Using Spring Boot to set up a REST-application server"},"content":{"rendered":"\n<p>The required setup of the backend server when starting out on a new project can sometimes be complex and time consuming. In this article we will show an easy way to get a REST server going, using Java and Spring Boot.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>At WATA Factory, we have been using Java quite extensively both in our clients\u2019 projects as well as for internal projects. Despite (or maybe even because of) its already proud age of 25 years, Java is still widely used.<\/p>\n\n\n\n<p>While there are generally better, non-java-based alternatives available for the frontend, such as Angular (using Typescript), React (using JavaScript) or Flutter (using Dart), Java is still often the best choice for backend development, and it is used extensively in projects of all kinds. For big, enterprise-level applications, it is still almost the industry standard.<\/p>\n\n\n\n<p>Of course, we all stand on the shoulders of giants, and nobody would be so crazy as to try to develop an entire application from scratch. Instead, we use application frameworks. In Java, there are quite a few. Which one is best suited depends entirely on the project requirements:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Jakarta EE (formerly Java EE) &#8211; Large-Scale enterprise apps<\/li>\n\n\n\n<li>Hibernate \u2013 a Java Object-Relationship-Mapping framework that works with JPA and simplifies working with databases<\/li>\n\n\n\n<li>Quarkus \u2013 Cloud and Microservices, very lightweight<\/li>\n\n\n\n<li>Spring framework \u2013 Probably the most popular, suited for Microservices, REST-Apps<\/li>\n<\/ul>\n\n\n\n<p>In this article we will look at Spring, or, more precisely, Spring Boot. It is built on top of the Spring framework and has been designed to simplify the development of standalone, production-ready applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Spring Boot?<\/h2>\n\n\n\n<p>When starting to develop a new application from scratch, traditionally with Java EE or Spring (without the Boot) a lot of configuration and boiler plate code was necessary. Manage dependencies, make sure everything works together, and then there is still the topic of deploying the application on a suitable application server, which can be very complex. For a big enterprise application, such extensive configuration and fine-grained control might actually be needed, but for smaller projects, this seems like a lot of overhead.<\/p>\n\n\n\n<p>This is where Spring Boot comes in. It was designed to simplify the development of standalone, production-ready Spring applications. It does so by removing the need for complex configuration, applying the principle of \u201cConvention over Configuration\u201d.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Convention over Configuration<\/h3>\n\n\n\n<p>This principle means that Spring Boot tries to provide sensible defaults for things that would in other cases have to be configured manually. For example, unless you configure it differently, Spring Boot already includes an embedded Tomcat server, no configuration at all needed.<\/p>\n\n\n\n<p>It also auto-configures components based on default values and classpath dependencies, thus considerably reducing the boilerplate code one must write to get an application off the ground and start being productive.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Spring Boot Initializr<\/h3>\n\n\n\n<p>Another feature of Spring Boot that helps to get started as fast as possible is the Spring Boot Initializr. This web-based tool allows configuring and generating an entire project and eliminates the need for manual setup and provides a ready-to-run project structure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating a Demo Application<\/h2>\n\n\n\n<p>Let us now create a working Spring boot application using the initializr<\/p>\n\n\n\n<p>Go to <a href=\"https:\/\/start.spring.io\/\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">https:\/\/start.spring.io\/<br><\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"937\" height=\"485\" src=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-1.png\" alt=\"Screenshot showing the Spring Boot interface for creating a new project, including configuration options like project metadata, dependencies, and build tools\" class=\"wp-image-12561\" srcset=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-1.png 937w, https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-1-300x155.png 300w, https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-1-768x398.png 768w\" sizes=\"auto, (max-width: 937px) 100vw, 937px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Choose your project management. Since we are using Java, we will go with Maven (Gradle also works with Maven \u2013 in the end it is probably a question of personal taste. While Gradle is less verbose and arguably more powerful, Maven is \u201ctried and tested\u201d and offers a plugin for almost any situation imaginable)<\/li>\n\n\n\n<li>Choose the language. We will choose Java<\/li>\n\n\n\n<li>Select the Spring Boot Version. This defaults to the current stable version, which is usually the best choice.<\/li>\n\n\n\n<li>Enter your metadata: For this simple demo, we will go with the defaults<\/li>\n\n\n\n<li>Choose \u2018Jar\u2019 as your packaging. This means that the compiled application will be available as an executable jar.<\/li>\n\n\n\n<li>Finally, select the Java version. You should use the one that you have installed on your system<\/li>\n<\/ul>\n\n\n\n<p>The most interesting part is on the right, hidden behind the button \u201cAdd Dependencies\u201d. Clicking here lets you add all kinds of dependencies without having to dive into maven central and searching by yourself. Each one comes with a small description. The list includes developer tools, web-related dependencies, databases (both SQL and Non-SQL), cloud, security, templating for server-side rendering, messaging, testing, AI and more.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"470\" src=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-2.png\" alt=\"Screenshot of the Spring Boot dependency selection page, where users choose libraries like Spring Web, Spring Data JPA, and H2 Database for their project\" class=\"wp-image-12564\" srcset=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-2.png 977w, https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-2-300x144.png 300w, https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-2-768x369.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p>For our little demo we will select the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Spring Web:<\/strong> Lets us create REST endpoints easily and provides the embedded Apache Tomcat as the default container<\/li>\n\n\n\n<li><strong>Spring Boot DevTools: <\/strong>Offers some quality-of-life tools like live reload during development and faster startup<\/li>\n\n\n\n<li><strong>Lombok:<\/strong> Saves writing a lot of boilerplate code for POJOs<\/li>\n\n\n\n<li><strong>Spring Data JPA:<\/strong> Database connectivity<\/li>\n\n\n\n<li><strong>H2 Database:<\/strong> Create a simple in-memory database for this project.<\/li>\n<\/ul>\n\n\n\n<p>Now click on \u201cgenerate\u201d to download a Zip-file. Then unzip the file and just open it with the IDE of your choice. For this demo, we will use IntelliJ.<\/p>\n\n\n\n<p>The initializr should have created the following files (there should be some other folders and files, but these are the important ones):<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>demo\/src\/main\/java\/com\/example\/demo\/<strong>DemoApplication.java<\/strong>:<br>The main executable for the app. Execute this file to start the app.<\/li>\n\n\n\n<li>Demo\/src\/main\/resources\/<strong>application.properties<\/strong>:<br>The main configuration file for the app. While this is a standard java properties file, you could also use YAML instead.<\/li>\n\n\n\n<li><strong>pom.xml<\/strong>:<br>All dependencies and build plugins are managed here.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Creating the First Endpoint<\/h3>\n\n\n\n<p>With the setup out of the way, we can now create our first endpoint. This one is going to be very basic and only displays text.<\/p>\n\n\n\n<p>First, create new Java file in the same folder as DemoApplication.java and name it HelloWataController.java. Now add the following code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.example.demo;\n\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\n@RequestMapping(\"\/hello\")\npublic class HelloWataController {\n\n    @GetMapping\n    public String sayHello() {\n        return \"Hello WATA Factory!\";\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>And that is all! Now run the application by executing DemoApplication.java. You might have to execute the Maven clean and install jobs first.<\/p>\n\n\n\n<p>Then open your browser and navigate to http:\/\/localhost:8080\/hello. Unsurprisingly, you should see \u201dHello WATA Factory!\u201d displayed in your browser window.<\/p>\n\n\n\n<p>Now, this endpoint is not very useful, but it serves to show with how few actual lines of code you can set up a working web application in Spring Boot.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Adding a Database<\/h3>\n\n\n\n<p>In the next step, we will add database support. That is why we added the H2 Database pack in the Initializr, after all. This database is only in-memory and will therefore be deleted after closing the application, but the setup process is the same for any kind of SQL-database. For this little demo we will read from a database of books.<\/p>\n\n\n\n<p>First, we need to configure the DB connection in our <strong>application.properties<\/strong> file. Add the following lines to the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>spring.application.name=demo\n\nspring.h2.console.enabled=true\nspring.datasource.url=jdbc:h2:mem:testdb\nspring.datasource.driverClassName=org.h2.Driver\nspring.datasource.username=sa\nspring.datasource.password=password\nspring.jpa.database-platform=org.hibernate.dialect.H2Dialect\nspring.jpa.hibernate.ddl-auto=update\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Defining the Entity class<\/h3>\n\n\n\n<p>Next, we will create our entity POJO class. Create a package called \u201cbook\u201d below \u201ccom.example.demo\u201d, and in that package create a new file called <strong>Book.java<\/strong>. Add the following code the newly created class:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Entity\n@Getter\n@Setter\npublic class Book {\n    @Id\n    @GeneratedValue(strategy = GenerationType.IDENTITY)\n    private Long id;\n    private String title;\n    private String author;\n}\n<\/code><\/pre>\n\n\n\n<p>This is our entity class that models the database entries for the \u201dbook\u201d-table, as denoted by the \u201c@Entity\u201d annotation.<\/p>\n\n\n\n<p>The \u201c@Getter\u201d and \u201c@Setter\u201d annotations come from the Lombok package we added in the initializr and add getters and setters for the attributes at compile time, so that we do not need to add them manually.<\/p>\n\n\n\n<p>The other two annotations define which of the attributes is the primary key for the entity, and how it is created.<\/p>\n\n\n\n<p>In Spring Boot terms, the class that reads and writes entities from and to the database is called a repository. Therefore, we need to create a repository class for our Book-entity. Let\u2019s call it \u201cBookRepository.java\u201d and put it right next to our entity class. It has only one line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public interface BookRepository extends JpaRepository&lt;Book, Long&gt; { }<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Defining the Service<\/h3>\n\n\n\n<p>In a classic three-tier-architecture, you normally do not access a repository directly from your endpoint. This is in order to isolate the different levels of the application from each other, which is generally good practice. Instead, you access the database through a service class.<\/p>\n\n\n\n<p>Let\u2019s create this class now, and call it, unsurprisingly, \u201c<strong>BookService.java<\/strong>\u201d. Here is the code for it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Service\npublic class BookService {\n \n    @Autowired\n    private BookRepository bookRepository;\n \n    public List&lt;Book&gt; getAllBooks() {\n        return bookRepository.findAll();\n    }\n \n    public Book getBookById(Long id) {\n        return bookRepository.findById(id).orElse(null);\n    }\n \n    public void deleteBook(Long id) {\n        bookRepository.deleteById(id);\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>All in all, we have three methods, one for getting all books, one to find a book by id, and one to delete a book from the database. But wait a minute, we never implemented those methods we are calling here in our BookRepository.java! In fact, our repository class is only an empty one-liner interface!<\/p>\n\n\n\n<p>This is another nice feature of Spring Boot, and another example of the \u201cconvention over configuration\u201d-philosophy. These methods will \u201cjust work\u201d out-of-the-box without the need to implement anything. There are a lot of possibilities to access a database without actually having to write SQL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Defining the Controller<\/h3>\n\n\n\n<p>Now the only thing left for our application is to make these methods accessible to the outside world. We will do so by creating a controller class that exposes three REST endpoints, one for each method:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@RestController\n@RequestMapping(\"\/api\/books\")\npublic class BookController {\n \n    @Autowired\n    private BookService bookService;\n \n    @GetMapping\n    public List&lt;Book&gt; getAllBooks() {\n        return bookService.getAllBooks();\n    }\n \n    @GetMapping(\"\/{id}\")\n    public Book getBookById(@PathVariable Long id) {\n        return bookService.getBookById(id);\n    }\n \n    @DeleteMapping(\"\/{id}\")\n    public void deleteBook(@PathVariable Long id) {\n        bookService.deleteBook(id);\n    }\n}\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Adding Data to the Database<\/h3>\n\n\n\n<p>Start the application again. Since we are using an in-memory database, it gets deleted every time the application is shut down. Therefore, first, we must add some data that we can then query through our endpoints.<\/p>\n\n\n\n<p>You can do so by opening your browser to <a href=\"http:\/\/localhost:8080\/h2-console\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:8080\/h2-console<\/a>. Use the data defined in application.properties to access the in-memory database. This opens another screen where you can run some SQL commands to populate the database with some books. Here are some inserts that you can use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO BOOK VALUES(1, 'George Orwell', '1984');\nINSERT INTO BOOK VALUES(2, 'J.R.R. Tolkien', 'The Lord of the Rings');\nINSERT INTO BOOK VALUES(3, 'Franz Kafka', 'Metamorphosis');\n<\/code><\/pre>\n\n\n\n<p>In case that you (like me) find it cumbersome to have to repeat this step every time you restart the application, you can simply save these inserts into a file called <strong>data.sql<\/strong> and place it in the <strong>src\/main\/resources<\/strong> directory. Also, in <strong>application.properties<\/strong>, you will have to change the line<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>spring.datasource.url=jdbc:h2:mem:testdb<\/code><\/pre>\n\n\n\n<p>To<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>spring.datasource.url=jdbc:h2:file:.\/data\/demo<\/code><\/pre>\n\n\n\n<p>They will now get executed automatically every time the application starts.<\/p>\n\n\n\n<p>&nbsp;This is yet another good example of Spring Boot\u2019s \u201cConvention over Configuration\u201d philosophy: You could, of course, configure a different filename and a different directory, but if you are content with these sensible defaults, it works right out of the box without having to hardly configure anything at all.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Testing the Application<\/h3>\n\n\n\n<p>Now that we have some data inserted into our database, we can test our endpoints. The easiest way to do this is by using a tool such as Postman, as it easily lets you try out the different http methods such as GET and DELETE. If you prefer the command line, curl might be your tool of choice.<\/p>\n\n\n\n<p>Making a GET request to <a href=\"http:\/\/localhost:8080\/api\/books\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:8080\/api\/books<\/a> should yield the following response:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"485\" src=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-3.png\" alt=\"Postman application interface sending a GET request to a Spring Boot REST API endpoint to retrieve a list of all books from the backend\" class=\"wp-image-12573\" srcset=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-3.png 977w, https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-3-300x149.png 300w, https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-3-768x381.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p>To only retrieve the book with id=2, call <a href=\"http:\/\/localhost:8080\/api\/books\/2\" target=\"_blank\" rel=\"noopener noreferrer nofollow\">http:\/\/localhost:8080\/api\/books\/2<\/a>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"306\" src=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-4.png\" alt=\"Postman interface displaying the result of a GET request to a Spring Boot REST API endpoint that returns the details of a single book by ID\" class=\"wp-image-12570\" srcset=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-4.png 977w, https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-4-300x94.png 300w, https:\/\/wata.es\/wp-content\/uploads\/2025\/08\/SpringBoot-screen-4-768x241.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p>Let us now delete the book with id=2 from the database by making a DELETE request, and then again retrieving all books to make sure it is really gone:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"245\" src=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-5.png\" alt=\"Postman application showing a DELETE request sent to a Spring Boot API endpoint to remove a specific book record from the database\" class=\"wp-image-12576\" srcset=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-5.png 977w, https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-5-300x75.png 300w, https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-5-768x193.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"408\" src=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-6.png\" alt=\"Postman used to test a Spring Boot REST API by sending a GET request to fetch all book records, displaying the JSON response in the interface\" class=\"wp-image-12579\" srcset=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-6.png 977w, https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-6-300x125.png 300w, https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/SpringBoot-screen-6-768x321.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p>All done! As we have tested, our endpoints work as expected.<\/p>\n\n\n\n<p>Of course, this little example is merely a proof of concept. It lacks security, testing, and of course a front end. &nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>At WATA Factory, we have and are using Java for our backend in both internal and external projects. While it is often perceived as being more cumbersome and difficult to set up than, for example, Javascript-based alternatives like NodeJS, this article has shown with how few actual lines of code a working application server can be set up in order to start getting productive as fast as possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The required setup of the backend server when starting out on a new project can sometimes be complex and time consuming. In this article we will show an easy way to get a REST server going, using Java and Spring Boot.<\/p>\n","protected":false},"author":46,"featured_media":12582,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[2,180],"tags":[],"class_list":["post-12557","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using Spring Boot to set up a REST-application server - WATA Factory<\/title>\n<meta name=\"description\" content=\"Learn how to quickly and easily build REST servers with Spring Boot. Step-by-step guide for Java developers. WATA Factory.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Spring Boot to set up a REST-application server - WATA Factory\" \/>\n<meta property=\"og:description\" content=\"Learn how to quickly and easily build REST servers with Spring Boot. Step-by-step guide for Java developers. WATA Factory.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/\" \/>\n<meta property=\"og:site_name\" content=\"WATA Factory\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/watafactory\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-18T07:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Oliver K\u00f6hler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@watafactory\" \/>\n<meta name=\"twitter:site\" content=\"@watafactory\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oliver K\u00f6hler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/\"},\"author\":{\"name\":\"Oliver K\u00f6hler\",\"@id\":\"https:\/\/wata.es\/#\/schema\/person\/cdf6ce448b7b97a74b3a4646c462a30f\"},\"headline\":\"Using Spring Boot to set up a REST-application server\",\"datePublished\":\"2025-08-18T07:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/\"},\"wordCount\":1909,\"publisher\":{\"@id\":\"https:\/\/wata.es\/#organization\"},\"image\":{\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg\",\"articleSection\":[\"News\",\"Technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/\",\"url\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/\",\"name\":\"Using Spring Boot to set up a REST-application server - WATA Factory\",\"isPartOf\":{\"@id\":\"https:\/\/wata.es\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg\",\"datePublished\":\"2025-08-18T07:00:00+00:00\",\"description\":\"Learn how to quickly and easily build REST servers with Spring Boot. Step-by-step guide for Java developers. WATA Factory.\",\"breadcrumb\":{\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#primaryimage\",\"url\":\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg\",\"contentUrl\":\"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg\",\"width\":2560,\"height\":1440,\"caption\":\"Illustration of a rocket about to launch with the WATA Factory logo, representing the well-planned start of a software project before development begins.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wata.es\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Spring Boot to set up a REST-application server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wata.es\/#website\",\"url\":\"https:\/\/wata.es\/\",\"name\":\"WATA Factory\",\"description\":\"IT Consulting &amp; Outsourcing for your company\",\"publisher\":{\"@id\":\"https:\/\/wata.es\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wata.es\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/wata.es\/#organization\",\"name\":\"WATA Factory\",\"url\":\"https:\/\/wata.es\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wata.es\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/wata.es\/wp-content\/uploads\/2019\/12\/logowata.png\",\"contentUrl\":\"https:\/\/wata.es\/wp-content\/uploads\/2019\/12\/logowata.png\",\"width\":688,\"height\":176,\"caption\":\"WATA Factory\"},\"image\":{\"@id\":\"https:\/\/wata.es\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/watafactory\/\",\"https:\/\/x.com\/watafactory\",\"https:\/\/www.linkedin.com\/company\/wata\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/wata.es\/#\/schema\/person\/cdf6ce448b7b97a74b3a4646c462a30f\",\"name\":\"Oliver K\u00f6hler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wata.es\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b87b0ffa05bc8b5e1baa4b56a7e476c9f521d3409650e28cb67696d0653e40cb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b87b0ffa05bc8b5e1baa4b56a7e476c9f521d3409650e28cb67696d0653e40cb?s=96&d=mm&r=g\",\"caption\":\"Oliver K\u00f6hler\"},\"url\":\"https:\/\/wata.es\/author\/o-koehler\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Spring Boot to set up a REST-application server - WATA Factory","description":"Learn how to quickly and easily build REST servers with Spring Boot. Step-by-step guide for Java developers. WATA Factory.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/","og_locale":"en_US","og_type":"article","og_title":"Using Spring Boot to set up a REST-application server - WATA Factory","og_description":"Learn how to quickly and easily build REST servers with Spring Boot. Step-by-step guide for Java developers. WATA Factory.","og_url":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/","og_site_name":"WATA Factory","article_publisher":"https:\/\/www.facebook.com\/watafactory\/","article_published_time":"2025-08-18T07:00:00+00:00","og_image":[{"width":2560,"height":1440,"url":"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg","type":"image\/jpeg"}],"author":"Oliver K\u00f6hler","twitter_card":"summary_large_image","twitter_creator":"@watafactory","twitter_site":"@watafactory","twitter_misc":{"Written by":"Oliver K\u00f6hler","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#article","isPartOf":{"@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/"},"author":{"name":"Oliver K\u00f6hler","@id":"https:\/\/wata.es\/#\/schema\/person\/cdf6ce448b7b97a74b3a4646c462a30f"},"headline":"Using Spring Boot to set up a REST-application server","datePublished":"2025-08-18T07:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/"},"wordCount":1909,"publisher":{"@id":"https:\/\/wata.es\/#organization"},"image":{"@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#primaryimage"},"thumbnailUrl":"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg","articleSection":["News","Technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/","url":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/","name":"Using Spring Boot to set up a REST-application server - WATA Factory","isPartOf":{"@id":"https:\/\/wata.es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#primaryimage"},"image":{"@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#primaryimage"},"thumbnailUrl":"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg","datePublished":"2025-08-18T07:00:00+00:00","description":"Learn how to quickly and easily build REST servers with Spring Boot. Step-by-step guide for Java developers. WATA Factory.","breadcrumb":{"@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#primaryimage","url":"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg","contentUrl":"https:\/\/wata.es\/wp-content\/uploads\/2025\/06\/rocket-scaled.jpg","width":2560,"height":1440,"caption":"Illustration of a rocket about to launch with the WATA Factory logo, representing the well-planned start of a software project before development begins."},{"@type":"BreadcrumbList","@id":"https:\/\/wata.es\/using-spring-boot-to-set-up-a-rest-application-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wata.es\/"},{"@type":"ListItem","position":2,"name":"Using Spring Boot to set up a REST-application server"}]},{"@type":"WebSite","@id":"https:\/\/wata.es\/#website","url":"https:\/\/wata.es\/","name":"WATA Factory","description":"IT Consulting &amp; Outsourcing for your company","publisher":{"@id":"https:\/\/wata.es\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wata.es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wata.es\/#organization","name":"WATA Factory","url":"https:\/\/wata.es\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wata.es\/#\/schema\/logo\/image\/","url":"https:\/\/wata.es\/wp-content\/uploads\/2019\/12\/logowata.png","contentUrl":"https:\/\/wata.es\/wp-content\/uploads\/2019\/12\/logowata.png","width":688,"height":176,"caption":"WATA Factory"},"image":{"@id":"https:\/\/wata.es\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/watafactory\/","https:\/\/x.com\/watafactory","https:\/\/www.linkedin.com\/company\/wata\/"]},{"@type":"Person","@id":"https:\/\/wata.es\/#\/schema\/person\/cdf6ce448b7b97a74b3a4646c462a30f","name":"Oliver K\u00f6hler","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wata.es\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b87b0ffa05bc8b5e1baa4b56a7e476c9f521d3409650e28cb67696d0653e40cb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b87b0ffa05bc8b5e1baa4b56a7e476c9f521d3409650e28cb67696d0653e40cb?s=96&d=mm&r=g","caption":"Oliver K\u00f6hler"},"url":"https:\/\/wata.es\/author\/o-koehler\/"}]}},"_links":{"self":[{"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/posts\/12557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/comments?post=12557"}],"version-history":[{"count":5,"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/posts\/12557\/revisions"}],"predecessor-version":[{"id":12672,"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/posts\/12557\/revisions\/12672"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/media\/12582"}],"wp:attachment":[{"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/media?parent=12557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/categories?post=12557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wata.es\/wp-json\/wp\/v2\/tags?post=12557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}