diff --git a/apache-olingo/olingo2/.gitignore b/apache-olingo/olingo2/.gitignore
new file mode 100644
index 0000000000..153c9335eb
--- /dev/null
+++ b/apache-olingo/olingo2/.gitignore
@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/
diff --git a/apache-olingo/olingo2/pom.xml b/apache-olingo/olingo2/pom.xml
new file mode 100644
index 0000000000..4fc81e5e49
--- /dev/null
+++ b/apache-olingo/olingo2/pom.xml
@@ -0,0 +1,108 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.1.3.RELEASE
+
+
+ org.baeldung.examples.olingo2
+ olingo2-sample
+ 0.0.1-SNAPSHOT
+ olingo2-sample
+ Sample Olingo 2 Project
+
+
+ 1.8
+ 2.0.11
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-jersey
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+
+
+ com.h2database
+ h2
+ runtime
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ org.apache.olingo
+ olingo-odata2-core
+ ${olingo2.version}
+
+
+
+ javax.ws.rs
+ javax.ws.rs-api
+
+
+
+
+ org.apache.olingo
+ olingo-odata2-api
+ ${olingo2.version}
+
+
+ org.apache.olingo
+ olingo-odata2-jpa-processor-api
+ ${olingo2.version}
+
+
+ org.apache.olingo
+ olingo-odata2-jpa-processor-core
+ ${olingo2.version}
+
+
+ org.apache.olingo
+ olingo-odata2-jpa-processor-ref
+ ${olingo2.version}
+
+
+ org.eclipse.persistence
+ eclipselink
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
diff --git a/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/CarsODataApplication.java b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/CarsODataApplication.java
new file mode 100644
index 0000000000..c7e3878f44
--- /dev/null
+++ b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/CarsODataApplication.java
@@ -0,0 +1,24 @@
+package org.baeldung.examples.olingo2;
+
+
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+
+import org.apache.olingo.odata2.core.rest.ODataRootLocator;
+import org.apache.olingo.odata2.core.rest.app.ODataApplication;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class CarsODataApplication extends ODataApplication {
+
+ private static final Logger log = LoggerFactory.getLogger(CarsODataApplication.class);
+
+ public CarsODataApplication() {
+ super();
+ log.info("[I17] Creating CarsODataApplication...");
+ }
+
+}
diff --git a/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/CarsODataJPAServiceFactory.java b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/CarsODataJPAServiceFactory.java
new file mode 100644
index 0000000000..2d0ae14686
--- /dev/null
+++ b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/CarsODataJPAServiceFactory.java
@@ -0,0 +1,38 @@
+package org.baeldung.examples.olingo2;
+
+import javax.persistence.EntityManager;
+
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPAContext;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPAServiceFactory;
+import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+/**
+ * OData ServiceFactory that
+ * @author Philippe
+ *
+ */
+@Component
+public class CarsODataJPAServiceFactory extends ODataJPAServiceFactory {
+
+ private EntityManager em;
+ private static final Logger log = LoggerFactory.getLogger(CarsODataJPAServiceFactory.class);
+
+ public CarsODataJPAServiceFactory(EntityManager em) {
+ this.em = em;
+ }
+
+ @Override
+ public ODataJPAContext initializeODataJPAContext() throws ODataJPARuntimeException {
+
+ ODataJPAContext oDataJPAContext = getODataJPAContext();
+ oDataJPAContext.setEntityManagerFactory(em.getEntityManagerFactory());
+ oDataJPAContext.setPersistenceUnitName("default");
+
+ return oDataJPAContext;
+
+ }
+
+}
diff --git a/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/JerseyConfig.java b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/JerseyConfig.java
new file mode 100644
index 0000000000..33db629318
--- /dev/null
+++ b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/JerseyConfig.java
@@ -0,0 +1,49 @@
+package org.baeldung.examples.olingo2;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.Path;
+
+import org.apache.olingo.odata2.api.ODataServiceFactory;
+import org.apache.olingo.odata2.core.rest.ODataRootLocator;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.springframework.stereotype.Component;
+
+@Component
+@ApplicationPath("/odata")
+public class JerseyConfig extends ResourceConfig {
+
+
+ public JerseyConfig(CarsODataApplication delegate,ServletContext servletContext,CarsODataJPAServiceFactory serviceFactory) {
+
+ delegate
+ .getClasses()
+ .forEach( c -> {
+ // Avoid using the default Locator
+ if ( !ODataRootLocator.class.isAssignableFrom(c)) {
+ register(c);
+ }
+ });
+
+ register(new CustomLocator(serviceFactory));
+
+ }
+
+
+ @Path("/")
+ public static class CustomLocator extends ODataRootLocator {
+
+ private CarsODataJPAServiceFactory serviceFactory;
+
+ public CustomLocator(CarsODataJPAServiceFactory serviceFactory) {
+ this.serviceFactory = serviceFactory;
+ }
+
+ @Override
+ public ODataServiceFactory getServiceFactory() {
+ return this.serviceFactory;
+ }
+
+ }
+
+}
diff --git a/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/Olingo2SampleApplication.java b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/Olingo2SampleApplication.java
new file mode 100644
index 0000000000..6cc4a45927
--- /dev/null
+++ b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/Olingo2SampleApplication.java
@@ -0,0 +1,15 @@
+package org.baeldung.examples.olingo2;
+
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+@SpringBootApplication
+public class Olingo2SampleApplication extends SpringBootServletInitializer {
+
+ public static void main(String[] args) {
+ new Olingo2SampleApplication()
+ .configure(new SpringApplicationBuilder(Olingo2SampleApplication.class))
+ .run(args);
+ }
+}
diff --git a/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/domain/CarMaker.java b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/domain/CarMaker.java
new file mode 100644
index 0000000000..1817a2dece
--- /dev/null
+++ b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/domain/CarMaker.java
@@ -0,0 +1,31 @@
+package org.baeldung.examples.olingo2.domain;
+
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.validation.constraints.NotNull;
+
+import lombok.Data;
+
+@Entity
+@Data
+@Table(name="car_maker")
+public class CarMaker {
+
+ @Id
+ private Long id;
+
+ @NotNull
+ @Column(name="name")
+ private String name;
+
+ @OneToMany(mappedBy="maker",cascade=CascadeType.ALL)
+ private List models;
+
+
+}
diff --git a/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/domain/CarModel.java b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/domain/CarModel.java
new file mode 100644
index 0000000000..285e5ce379
--- /dev/null
+++ b/apache-olingo/olingo2/src/main/java/org/baeldung/examples/olingo2/domain/CarModel.java
@@ -0,0 +1,30 @@
+package org.baeldung.examples.olingo2.domain;
+
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.validation.constraints.NotNull;
+
+import lombok.Data;
+
+@Entity
+@Data
+public class CarModel {
+
+ @Id
+ private Long id;
+
+ @NotNull
+ private String name;
+
+ @NotNull
+ private Integer year;
+
+ @NotNull
+ private String sku;
+
+ @ManyToOne
+ private CarMaker maker;
+
+}
diff --git a/apache-olingo/olingo2/src/main/resources/application.yml b/apache-olingo/olingo2/src/main/resources/application.yml
new file mode 100644
index 0000000000..2af431eee1
--- /dev/null
+++ b/apache-olingo/olingo2/src/main/resources/application.yml
@@ -0,0 +1,9 @@
+
+spring:
+ jersey:
+ application-path: /odata
+
+ jpa:
+ show-sql: true
+ hibernate:
+ ddl-auto: update
\ No newline at end of file
diff --git a/apache-olingo/olingo2/src/main/resources/data.sql b/apache-olingo/olingo2/src/main/resources/data.sql
new file mode 100644
index 0000000000..c1d32dc6ef
--- /dev/null
+++ b/apache-olingo/olingo2/src/main/resources/data.sql
@@ -0,0 +1,3 @@
+insert into car_maker(id,name) values (1,'Special Motors');
+insert into car_maker(id,name) values (2,'BWM');
+insert into car_maker(id,name) values (3,'Dolores');
diff --git a/apache-olingo/olingo2/src/test/java/org/baeldung/examples/olingo2/Olingo2SampleApplicationTests.java b/apache-olingo/olingo2/src/test/java/org/baeldung/examples/olingo2/Olingo2SampleApplicationTests.java
new file mode 100644
index 0000000000..687f6ab1ff
--- /dev/null
+++ b/apache-olingo/olingo2/src/test/java/org/baeldung/examples/olingo2/Olingo2SampleApplicationTests.java
@@ -0,0 +1,16 @@
+package org.baeldung.examples.olingo2;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class Olingo2SampleApplicationTests {
+
+ @Test
+ public void contextLoads() {
+ }
+
+}
diff --git a/software-security/sql-injection-samples/pom.xml b/software-security/sql-injection-samples/pom.xml
index 5b33c674d4..b943151896 100644
--- a/software-security/sql-injection-samples/pom.xml
+++ b/software-security/sql-injection-samples/pom.xml
@@ -55,6 +55,10 @@
+
+ org.springframework.boot
+ spring-boot-devtools
+