diff --git a/pom.xml b/pom.xml
index bca2807e75..3fd1bcf5fb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -544,7 +544,6 @@
ratpack
reactor-core
- rest-with-spark-java
resteasy
restx
@@ -1222,7 +1221,6 @@
ratpack
reactor-core
- rest-with-spark-java
resteasy
restx
diff --git a/rest-with-spark-java/README.md b/rest-with-spark-java/README.md
deleted file mode 100644
index ff12555376..0000000000
--- a/rest-with-spark-java/README.md
+++ /dev/null
@@ -1 +0,0 @@
-## Relevant articles:
diff --git a/rest-with-spark-java/pom.xml b/rest-with-spark-java/pom.xml
deleted file mode 100644
index fc78ac6b86..0000000000
--- a/rest-with-spark-java/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- 4.0.0
- com.baeldung
- rest-with-spark-java
- 1.0-SNAPSHOT
- rest-with-spark-java
- http://maven.apache.org
-
-
- com.baeldung
- parent-modules
- 1.0.0-SNAPSHOT
-
-
-
-
- com.sparkjava
- spark-core
- ${spark-core.version}
-
-
- com.fasterxml.jackson.core
- jackson-core
- ${jackson.version}
-
-
- com.fasterxml.jackson.core
- jackson-databind
- ${jackson.version}
-
-
-
-
- 2.5.4
-
-
-
diff --git a/rest-with-spark-java/src/main/java/com/baeldung/Router.java b/rest-with-spark-java/src/main/java/com/baeldung/Router.java
deleted file mode 100644
index 3482184e1e..0000000000
--- a/rest-with-spark-java/src/main/java/com/baeldung/Router.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.baeldung;
-
-import static spark.Spark.after;
-import static spark.Spark.before;
-import static spark.Spark.delete;
-import static spark.Spark.get;
-import static spark.Spark.post;
-import static spark.Spark.port;
-
-import com.baeldung.domain.Book;
-import com.baeldung.service.LibraryService;
-
-public class Router {
-
- public static void main( String[] args ){
-
- port(8080);
-
- before((request, response) -> {
-
- //do some filtering stuff
-
- });
-
- after((request, response) -> {
- response.type("application/json");
- });
-
- get("ListOfBooks", (request, response) -> {
- return LibraryService.view();
- });
-
- get("SearchBook/:title", (request, response) -> {
- return LibraryService.view(request.params("title"));
- });
-
- post("AddBook/:title/:author/:publisher", (request, response) -> {
- Book book = new Book();
- book.setTitle(request.params("title"));
- book.setAuthor(request.params("author"));
- book.setPublisher(request.params("publisher"));
- return LibraryService.add(book);
- });
-
- delete("DeleteBook/:title", (request, response) -> {
- return LibraryService.delete(request.params("title"));
- });
-
- }
-}
diff --git a/rest-with-spark-java/src/main/java/com/baeldung/domain/Book.java b/rest-with-spark-java/src/main/java/com/baeldung/domain/Book.java
deleted file mode 100644
index 977d5d9f89..0000000000
--- a/rest-with-spark-java/src/main/java/com/baeldung/domain/Book.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.baeldung.domain;
-
-public class Book {
-
- private String title;
- private String author;
- private String publisher;
-
- public Book() {}
-
- public Book(String title, String author, String publisher) {
- super();
- this.title = title;
- this.author = author;
- this.publisher = publisher;
- }
-
- public String getTitle() {
- return title;
- }
- public void setTitle(String title) {
- this.title = title;
- }
- public String getAuthor() {
- return author;
- }
-
- public void setAuthor(String author) {
- this.author = author;
- }
- public String getPublisher() {
- return publisher;
- }
- public void setPublisher(String publisher) {
- this.publisher = publisher;
- }
-
- protected boolean canEqual(Object other) {
- return other instanceof Book;
- }
-
- @Override
- public boolean equals(Object o) {
- if (o == this) return true;
- if (!(o instanceof Book)) return false;
- Book other = (Book) o;
- if (!other.canEqual((Object)this)) return false;
- if (this.getTitle() == null ? other.getTitle() != null : !this.getTitle().equals(other.getTitle())) return false;
- return true;
- }
-
-}
diff --git a/rest-with-spark-java/src/main/java/com/baeldung/service/LibraryService.java b/rest-with-spark-java/src/main/java/com/baeldung/service/LibraryService.java
deleted file mode 100644
index e4ca4c270c..0000000000
--- a/rest-with-spark-java/src/main/java/com/baeldung/service/LibraryService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.baeldung.service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.baeldung.domain.Book;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectWriter;
-
-public class LibraryService {
-
- private static ObjectWriter mapper = new ObjectMapper().writer().withDefaultPrettyPrinter();
- private static Map library = new HashMap();
-
- public static String view() throws JsonProcessingException {
- List books = new ArrayList();
- library.forEach((key, value) -> {
- books.add(value);
- });
- return mapper.writeValueAsString(books);
- }
-
- public static String view(String title) throws JsonProcessingException {
- return mapper.writeValueAsString(library.get(title));
- }
-
- public static String add(Book book) throws JsonProcessingException {
- library.put(book.getTitle(), book);
- return mapper.writeValueAsString(book);
- }
-
- public static String delete(String title) throws JsonProcessingException {
- Book deletedBook = library.remove(title);
- return mapper.writeValueAsString(deletedBook);
- }
-
-}
diff --git a/rest-with-spark-java/src/main/resources/logback.xml b/rest-with-spark-java/src/main/resources/logback.xml
deleted file mode 100644
index 7d900d8ea8..0000000000
--- a/rest-with-spark-java/src/main/resources/logback.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/rest-with-spark-java/src/test/java/com/baeldung/AppLiveTest.java b/rest-with-spark-java/src/test/java/com/baeldung/AppLiveTest.java
deleted file mode 100644
index 9e24879767..0000000000
--- a/rest-with-spark-java/src/test/java/com/baeldung/AppLiveTest.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package com.baeldung;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.baeldung.domain.Book;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class AppLiveTest extends TestCase {
-
- ObjectMapper mapper = new ObjectMapper();
-
- public AppLiveTest( String testName ) {
- super( testName );
- }
-
- public static Test suite() {
- return new TestSuite( AppLiveTest.class );
- }
-
- public void testApp() throws IOException, ClassNotFoundException {
-
- URL url;
- HttpURLConnection conn;
- BufferedReader br;
- String output;
- StringBuffer resp;
- Book book;
- Book temp;
-
- url = new URL("http://localhost:8080/AddBook/Odessy/YannMartel/GreenLeaves");
- conn = (HttpURLConnection) url.openConnection();
- conn.setRequestMethod("POST");
- conn.getContent();
- br = new BufferedReader(new InputStreamReader(
- (conn.getInputStream())));
- resp = new StringBuffer();
-
- while ((output = br.readLine()) != null) {
- resp.append(output);
- }
-
- book = mapper.readValue(resp.toString(), Book.class);
- temp = new Book("Odessy","YannMartel","GreenLeaves");
-
- assertEquals(book, temp);
-
- url = new URL("http://localhost:8080/AddBook/Twilight/StephenieMeyer/LittleBrown");
- conn = (HttpURLConnection) url.openConnection();
- conn.setRequestMethod("POST");
- br = new BufferedReader(new InputStreamReader(
- (conn.getInputStream())));
- resp = new StringBuffer();
-
- while ((output = br.readLine()) != null) {
- resp.append(output);
- }
-
- book = mapper.readValue(resp.toString(), Book.class);
- temp = new Book("Twilight","StephenieMeyer","LittleBrown");
-
- assertEquals(book, temp);
-
- url = new URL("http://localhost:8080/ListOfBooks");
- conn = (HttpURLConnection) url.openConnection();
- conn.setRequestMethod("GET");
- br = new BufferedReader(new InputStreamReader(
- (conn.getInputStream())));
- resp = new StringBuffer();
-
- while ((output = br.readLine()) != null) {
- resp.append(output);
- }
-
- List books = new ArrayList();
-
- books.add(new Book("Odessy","YannMartel","GreenLeaves"));
- books.add(new Book("Twilight","StephenieMeyer","LittleBrown"));
-
- List listOfBooks = mapper.readValue(resp.toString(), new TypeReference>(){});
-
- assertEquals(books, listOfBooks);
-
- url = new URL("http://localhost:8080/SearchBook/Twilight");
- conn = (HttpURLConnection) url.openConnection();
- conn.setRequestMethod("GET");
- br = new BufferedReader(new InputStreamReader(
- (conn.getInputStream())));
- resp = new StringBuffer();
-
- while ((output = br.readLine()) != null) {
- resp.append(output);
- }
-
- book = mapper.readValue(resp.toString(), Book.class);
- temp = new Book("Twilight","StephenieMeyer","LittleBrown");
-
- assertEquals(book, temp);
-
- url = new URL("http://localhost:8080/DeleteBook/Twilight");
- conn = (HttpURLConnection) url.openConnection();
- conn.setRequestMethod("DELETE");
- br = new BufferedReader(new InputStreamReader(
- (conn.getInputStream())));
- resp = new StringBuffer();
-
- while ((output = br.readLine()) != null) {
- resp.append(output);
- }
-
- book = mapper.readValue(resp.toString(), Book.class);
- temp = new Book("Twilight","StephenieMeyer","LittleBrown");
-
- assertEquals(book, temp);
-
- url = new URL("http://localhost:8080/ListOfBooks");
- conn = (HttpURLConnection) url.openConnection();
- conn.setRequestMethod("GET");
- br = new BufferedReader(new InputStreamReader(
- (conn.getInputStream())));
- resp = new StringBuffer();
-
- while ((output = br.readLine()) != null) {
- resp.append(output);
- }
-
- books = new ArrayList();
-
- books.add(new Book("Odessy","YannMartel","GreenLeaves"));
- listOfBooks = mapper.readValue(resp.toString(), new TypeReference>(){});
-
- assertEquals(books, listOfBooks);
-
- conn.disconnect();
-
- }
-
-}