- org.baeldung.sample.App
+ org.baeldung.sample.App
4.3.4.RELEASE
4.2.0.RELEASE
diff --git a/spring-all/src/main/java/com/baeldung/contexts/config/AnnotationsBasedApplicationAndServletInitializer.java b/spring-all/src/main/java/com/baeldung/contexts/config/AnnotationsBasedApplicationAndServletInitializer.java
new file mode 100644
index 0000000000..4df1e2e73b
--- /dev/null
+++ b/spring-all/src/main/java/com/baeldung/contexts/config/AnnotationsBasedApplicationAndServletInitializer.java
@@ -0,0 +1,36 @@
+package com.baeldung.contexts.config;
+
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+import org.springframework.web.servlet.support.AbstractDispatcherServletInitializer;
+
+public class AnnotationsBasedApplicationAndServletInitializer extends AbstractDispatcherServletInitializer {
+
+ @Override
+ protected WebApplicationContext createRootApplicationContext() {
+ //If this is not the only class declaring a root context, we return null because it would clash
+ //with other classes, as there can only be a single root context.
+
+ //AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();
+ //rootContext.register(RootApplicationConfig.class);
+ //return rootContext;
+ return null;
+ }
+
+ @Override
+ protected WebApplicationContext createServletApplicationContext() {
+ AnnotationConfigWebApplicationContext normalWebAppContext = new AnnotationConfigWebApplicationContext();
+ normalWebAppContext.register(NormalWebAppConfig.class);
+ return normalWebAppContext;
+ }
+
+ @Override
+ protected String[] getServletMappings() {
+ return new String[] { "/api/*" };
+ }
+
+ @Override
+ protected String getServletName() {
+ return "normal-dispatcher";
+ }
+}
diff --git a/spring-all/src/main/java/com/baeldung/contexts/config/AnnotationsBasedApplicationInitializer.java b/spring-all/src/main/java/com/baeldung/contexts/config/AnnotationsBasedApplicationInitializer.java
new file mode 100644
index 0000000000..0d2674d4f3
--- /dev/null
+++ b/spring-all/src/main/java/com/baeldung/contexts/config/AnnotationsBasedApplicationInitializer.java
@@ -0,0 +1,16 @@
+package com.baeldung.contexts.config;
+
+import org.springframework.web.context.AbstractContextLoaderInitializer;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+
+public class AnnotationsBasedApplicationInitializer extends AbstractContextLoaderInitializer {
+
+ @Override
+ protected WebApplicationContext createRootApplicationContext() {
+ AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();
+ rootContext.register(RootApplicationConfig.class);
+ return rootContext;
+ }
+
+}
\ No newline at end of file
diff --git a/spring-all/src/main/java/com/baeldung/contexts/config/ApplicationInitializer.java b/spring-all/src/main/java/com/baeldung/contexts/config/ApplicationInitializer.java
index c3ff90cf39..09e0742394 100644
--- a/spring-all/src/main/java/com/baeldung/contexts/config/ApplicationInitializer.java
+++ b/spring-all/src/main/java/com/baeldung/contexts/config/ApplicationInitializer.java
@@ -5,31 +5,36 @@ import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+import org.springframework.web.context.support.XmlWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
-@Configuration
public class ApplicationInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
- AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();
- rootContext.register(RootApplicationConfig.class);
- servletContext.addListener(new ContextLoaderListener(rootContext));
-
- AnnotationConfigWebApplicationContext normalWebAppContext = new AnnotationConfigWebApplicationContext();
- normalWebAppContext.register(NormalWebAppConfig.class);
- ServletRegistration.Dynamic normal = servletContext.addServlet("normal-webapp", new DispatcherServlet(normalWebAppContext));
- normal.setLoadOnStartup(1);
- normal.addMapping("/api/*");
-
- AnnotationConfigWebApplicationContext secureWebAppContext = new AnnotationConfigWebApplicationContext();
- secureWebAppContext.register(SecureWebAppConfig.class);
- ServletRegistration.Dynamic secure = servletContext.addServlet("secure-webapp", new DispatcherServlet(secureWebAppContext));
- secure.setLoadOnStartup(1);
- secure.addMapping("/s/api/*");
+ //Here, we can define a root context and register servlets, among other things.
+ //However, since we've later defined other classes to do the same and they would clash,
+ //we leave this commented out.
+
+ //Root XML Context
+ //XmlWebApplicationContext rootContext = new XmlWebApplicationContext();
+ //rootContext.setConfigLocations("/WEB-INF/rootApplicationContext.xml");
+ //Annotations Context
+ //AnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();
+ //rootContext.register(RootApplicationConfig.class);
+ //Registration
+ //servletContext.addListener(new ContextLoaderListener(rootContext));
+
+ //Dispatcher Servlet
+ //XmlWebApplicationContext normalWebAppContext = new XmlWebApplicationContext();
+ //normalWebAppContext.setConfigLocation("/WEB-INF/normal-webapp-servlet.xml");
+ //ServletRegistration.Dynamic normal = servletContext.addServlet("normal-webapp", new DispatcherServlet(normalWebAppContext));
+ //normal.setLoadOnStartup(1);
+ //normal.addMapping("/api/*");
}
}
diff --git a/spring-all/src/main/java/com/baeldung/contexts/config/SecureAnnotationsBasedApplicationAndServletInitializer.java b/spring-all/src/main/java/com/baeldung/contexts/config/SecureAnnotationsBasedApplicationAndServletInitializer.java
new file mode 100644
index 0000000000..89ce0153f5
--- /dev/null
+++ b/spring-all/src/main/java/com/baeldung/contexts/config/SecureAnnotationsBasedApplicationAndServletInitializer.java
@@ -0,0 +1,32 @@
+package com.baeldung.contexts.config;
+
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+import org.springframework.web.servlet.support.AbstractDispatcherServletInitializer;
+
+public class SecureAnnotationsBasedApplicationAndServletInitializer extends AbstractDispatcherServletInitializer {
+
+ @Override
+ protected WebApplicationContext createRootApplicationContext() {
+ return null;
+ }
+
+ @Override
+ protected WebApplicationContext createServletApplicationContext() {
+ AnnotationConfigWebApplicationContext secureWebAppContext = new AnnotationConfigWebApplicationContext();
+ secureWebAppContext.register(SecureWebAppConfig.class);
+ return secureWebAppContext;
+ }
+
+ @Override
+ protected String[] getServletMappings() {
+ return new String[] { "/s/api/*" };
+ }
+
+
+ @Override
+ protected String getServletName() {
+ return "secure-dispatcher";
+ }
+
+}
diff --git a/spring-all/src/main/java/com/baeldung/contexts/normal/HelloWorldController.java b/spring-all/src/main/java/com/baeldung/contexts/normal/HelloWorldController.java
index dd70ce8e97..fbe3dfb398 100644
--- a/spring-all/src/main/java/com/baeldung/contexts/normal/HelloWorldController.java
+++ b/spring-all/src/main/java/com/baeldung/contexts/normal/HelloWorldController.java
@@ -35,7 +35,7 @@ public class HelloWorldController {
@RequestMapping(path = "/welcome")
public ModelAndView helloWorld() {
processContext();
- String message = "
" + "
" + greeterService.greet() + "
";
+ String message = "
" + "
Normal " + greeterService.greet() + "
";
return new ModelAndView("welcome", "message", message);
}
}
diff --git a/spring-all/src/main/java/com/baeldung/contexts/secure/HelloWorldSecureController.java b/spring-all/src/main/java/com/baeldung/contexts/secure/HelloWorldSecureController.java
index b46ace91ae..4ebf2d55e0 100644
--- a/spring-all/src/main/java/com/baeldung/contexts/secure/HelloWorldSecureController.java
+++ b/spring-all/src/main/java/com/baeldung/contexts/secure/HelloWorldSecureController.java
@@ -43,7 +43,7 @@ public class HelloWorldSecureController {
@RequestMapping(path = "/welcome")
public ModelAndView helloWorld() {
processContext();
- String message = "
" + "
" + greeterService.greet() + "
";
+ String message = "
" + "
Secure " + greeterService.greet() + "
";
return new ModelAndView("welcome", "message", message);
}
}
diff --git a/spring-all/src/main/java/org/baeldung/caching/config/ApplicationCacheConfig.java b/spring-all/src/main/java/org/baeldung/caching/config/ApplicationCacheConfig.java
new file mode 100644
index 0000000000..8bf23de2cc
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/caching/config/ApplicationCacheConfig.java
@@ -0,0 +1,30 @@
+package org.baeldung.caching.config;
+
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.concurrent.ConcurrentMapCache;
+import org.springframework.cache.interceptor.KeyGenerator;
+import org.springframework.cache.support.SimpleCacheManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Arrays;
+
+@EnableCaching
+@Configuration
+public class ApplicationCacheConfig {
+
+ @Bean
+ public CacheManager cacheManager() {
+ SimpleCacheManager cacheManager = new SimpleCacheManager();
+ Cache booksCache = new ConcurrentMapCache("books");
+ cacheManager.setCaches(Arrays.asList(booksCache));
+ return cacheManager;
+ }
+
+ @Bean("customKeyGenerator")
+ public KeyGenerator keyGenerator() {
+ return new CustomKeyGenerator();
+ }
+}
diff --git a/spring-all/src/main/java/org/baeldung/caching/config/CustomKeyGenerator.java b/spring-all/src/main/java/org/baeldung/caching/config/CustomKeyGenerator.java
new file mode 100644
index 0000000000..c1da9493e0
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/caching/config/CustomKeyGenerator.java
@@ -0,0 +1,14 @@
+package org.baeldung.caching.config;
+
+import org.springframework.cache.interceptor.KeyGenerator;
+import org.springframework.util.StringUtils;
+
+import java.lang.reflect.Method;
+
+public class CustomKeyGenerator implements KeyGenerator {
+
+ public Object generate(Object target, Method method, Object... params) {
+ return target.getClass().getSimpleName() + "_" + method.getName() + "_"
+ + StringUtils.arrayToDelimitedString(params, "_");
+ }
+}
diff --git a/spring-all/src/main/java/org/baeldung/caching/example/BookService.java b/spring-all/src/main/java/org/baeldung/caching/example/BookService.java
new file mode 100644
index 0000000000..26118d61de
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/caching/example/BookService.java
@@ -0,0 +1,21 @@
+package org.baeldung.caching.example;
+
+import org.baeldung.model.Book;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Component
+public class BookService {
+
+ @Cacheable(value="books", keyGenerator="customKeyGenerator")
+ public List getBooks() {
+ List books = new ArrayList();
+ books.add(new Book(1, "The Counterfeiters", "André Gide"));
+ books.add(new Book(2, "Peer Gynt and Hedda Gabler", "Henrik Ibsen"));
+ return books;
+ }
+
+}
diff --git a/spring-all/src/main/java/org/baeldung/controller/config/StudentControllerConfig.java b/spring-all/src/main/java/org/baeldung/controller/config/StudentControllerConfig.java
index ec6cf19785..3dc4db53c0 100644
--- a/spring-all/src/main/java/org/baeldung/controller/config/StudentControllerConfig.java
+++ b/spring-all/src/main/java/org/baeldung/controller/config/StudentControllerConfig.java
@@ -19,10 +19,13 @@ public class StudentControllerConfig implements WebApplicationInitializer {
root.setServletContext(sc);
- // Manages the lifecycle of the root application context
- sc.addListener(new ContextLoaderListener(root));
+ //Manages the lifecycle of the root application context.
+ //Conflicts with other root contexts in the application, so we've manually set the parent below.
+ //sc.addListener(new ContextLoaderListener(root));
- DispatcherServlet dv = new DispatcherServlet(new GenericWebApplicationContext());
+ GenericWebApplicationContext webApplicationContext = new GenericWebApplicationContext();
+ webApplicationContext.setParent(root);
+ DispatcherServlet dv = new DispatcherServlet(webApplicationContext);
ServletRegistration.Dynamic appServlet = sc.addServlet("test-mvc", dv);
appServlet.setLoadOnStartup(1);
diff --git a/spring-all/src/main/java/org/baeldung/model/Book.java b/spring-all/src/main/java/org/baeldung/model/Book.java
new file mode 100644
index 0000000000..9305ce9653
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/model/Book.java
@@ -0,0 +1,41 @@
+package org.baeldung.model;
+
+public class Book {
+
+ private int id;
+ private String author;
+ private String title;
+
+ public Book() {
+ }
+
+ public Book(int id, String author, String title) {
+ this.id = id;
+ this.author = author;
+ this.title = title;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+}
diff --git a/spring-all/src/main/java/org/baeldung/order/Average.java b/spring-all/src/main/java/org/baeldung/order/Average.java
new file mode 100644
index 0000000000..d1d9117fb1
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/order/Average.java
@@ -0,0 +1,15 @@
+package org.baeldung.order;
+
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+@Component
+@Order(Ordered.LOWEST_PRECEDENCE)
+public class Average implements Rating {
+
+ @Override
+ public int getRating() {
+ return 3;
+ }
+}
diff --git a/spring-all/src/main/java/org/baeldung/order/Excellent.java b/spring-all/src/main/java/org/baeldung/order/Excellent.java
new file mode 100644
index 0000000000..e5f125593f
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/order/Excellent.java
@@ -0,0 +1,14 @@
+package org.baeldung.order;
+
+import org.springframework.stereotype.Component;
+import org.springframework.core.annotation.Order;
+
+@Component
+@Order(1)
+public class Excellent implements Rating {
+
+ @Override
+ public int getRating() {
+ return 1;
+ }
+}
diff --git a/spring-all/src/main/java/org/baeldung/order/Good.java b/spring-all/src/main/java/org/baeldung/order/Good.java
new file mode 100644
index 0000000000..3dd9852cc4
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/order/Good.java
@@ -0,0 +1,14 @@
+package org.baeldung.order;
+
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+@Component
+@Order(2)
+public class Good implements Rating {
+
+ @Override
+ public int getRating() {
+ return 2;
+ }
+}
diff --git a/spring-all/src/main/java/org/baeldung/order/Rating.java b/spring-all/src/main/java/org/baeldung/order/Rating.java
new file mode 100644
index 0000000000..dd0391a3d9
--- /dev/null
+++ b/spring-all/src/main/java/org/baeldung/order/Rating.java
@@ -0,0 +1,6 @@
+package org.baeldung.order;
+
+public interface Rating {
+
+ int getRating();
+}
diff --git a/spring-all/src/main/java/org/baeldung/spring/config/MainWebAppInitializer.java b/spring-all/src/main/java/org/baeldung/spring/config/MainWebAppInitializer.java
index 5ef83b8afd..a857783c60 100644
--- a/spring-all/src/main/java/org/baeldung/spring/config/MainWebAppInitializer.java
+++ b/spring-all/src/main/java/org/baeldung/spring/config/MainWebAppInitializer.java
@@ -26,11 +26,14 @@ public class MainWebAppInitializer implements WebApplicationInitializer {
root.scan("org.baeldung.spring.config");
// root.getEnvironment().setDefaultProfiles("embedded");
- // Manages the lifecycle of the root application context
- sc.addListener(new ContextLoaderListener(root));
+ //Manages the lifecycle of the root application context.
+ //Conflicts with other root contexts in the application, so we've manually set the parent below.
+ //sc.addListener(new ContextLoaderListener(root));
// Handles requests into the application
- final ServletRegistration.Dynamic appServlet = sc.addServlet("mvc", new DispatcherServlet(new GenericWebApplicationContext()));
+ GenericWebApplicationContext webApplicationContext = new GenericWebApplicationContext();
+ webApplicationContext.setParent(root);
+ final ServletRegistration.Dynamic appServlet = sc.addServlet("mvc", new DispatcherServlet(webApplicationContext));
appServlet.setLoadOnStartup(1);
final Set mappingConflicts = appServlet.addMapping("/");
if (!mappingConflicts.isEmpty()) {
diff --git a/spring-all/src/main/webapp/WEB-INF/greeting.xml b/spring-all/src/main/webapp/WEB-INF/greeting.xml
new file mode 100644
index 0000000000..3f0ae83455
--- /dev/null
+++ b/spring-all/src/main/webapp/WEB-INF/greeting.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-all/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-all/src/main/webapp/WEB-INF/mvc-servlet.xml
deleted file mode 100644
index 4ba9642448..0000000000
--- a/spring-all/src/main/webapp/WEB-INF/mvc-servlet.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/spring-all/src/main/webapp/WEB-INF/normal-webapp-servlet.xml b/spring-all/src/main/webapp/WEB-INF/normal-webapp-servlet.xml
index d358e2d62b..0a7a0919a8 100644
--- a/spring-all/src/main/webapp/WEB-INF/normal-webapp-servlet.xml
+++ b/spring-all/src/main/webapp/WEB-INF/normal-webapp-servlet.xml
@@ -1,12 +1,9 @@
diff --git a/spring-all/src/main/webapp/WEB-INF/rootApplicationContext.xml b/spring-all/src/main/webapp/WEB-INF/rootApplicationContext.xml
index cd79c64e79..af03661ebc 100644
--- a/spring-all/src/main/webapp/WEB-INF/rootApplicationContext.xml
+++ b/spring-all/src/main/webapp/WEB-INF/rootApplicationContext.xml
@@ -10,7 +10,5 @@
-
-
-
+
\ No newline at end of file
diff --git a/spring-all/src/main/webapp/WEB-INF/secure-webapp-servlet.xml b/spring-all/src/main/webapp/WEB-INF/secure-webapp-servlet.xml
index 5bca724670..6cdd3971bf 100644
--- a/spring-all/src/main/webapp/WEB-INF/secure-webapp-servlet.xml
+++ b/spring-all/src/main/webapp/WEB-INF/secure-webapp-servlet.xml
@@ -1,12 +1,9 @@
diff --git a/spring-all/src/main/webapp/WEB-INF/web.xml b/spring-all/src/main/webapp/WEB-INF/web.xml
index 2050f28f81..42020e75c4 100644
--- a/spring-all/src/main/webapp/WEB-INF/web.xml
+++ b/spring-all/src/main/webapp/WEB-INF/web.xml
@@ -3,37 +3,54 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
- test-mvc
+ normal-webapp-annotations
org.springframework.web.servlet.DispatcherServlet
+
+ contextClass
+ org.springframework.web.context.support.AnnotationConfigWebApplicationContext
+
contextConfigLocation
- /WEB-INF/test-mvc.xml
+ com.baeldung.contexts.config.NormalWebAppConfig
1
-
- test-mvc
- /test/*
+ normal-webapp-annotations
+ /api-ann/*
diff --git a/spring-all/src/main/webapp/WEB-INF/web_old.xml b/spring-all/src/main/webapp/WEB-INF/web_old.xml
deleted file mode 100644
index 016369ad27..0000000000
--- a/spring-all/src/main/webapp/WEB-INF/web_old.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- Spring MVC Application
-
-
-
- contextClass
-
- org.springframework.web.context.support.AnnotationConfigWebApplicationContext
-
-
-
- contextConfigLocation
- org.baeldung.spring.web.config
-
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
-
- mvc
- org.springframework.web.servlet.DispatcherServlet
- 1
-
-
- mvc
- /
-
-
-
- index.html
-
-
-
\ No newline at end of file
diff --git a/spring-all/src/test/java/org/baeldung/order/RatingRetrieverUnitTest.java b/spring-all/src/test/java/org/baeldung/order/RatingRetrieverUnitTest.java
new file mode 100644
index 0000000000..a624f757fc
--- /dev/null
+++ b/spring-all/src/test/java/org/baeldung/order/RatingRetrieverUnitTest.java
@@ -0,0 +1,37 @@
+package org.baeldung.order;
+
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.support.AnnotationConfigContextLoader;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(loader = AnnotationConfigContextLoader.class)
+public class RatingRetrieverUnitTest {
+
+ @Configuration
+ @ComponentScan(basePackages = {"org.baeldung.order"})
+ static class ContextConfiguration {}
+
+ @Autowired
+ private List ratings;
+
+ @Test
+ public void givenOrderOnComponents_whenInjected_thenAutowireByOrderValue() {
+ assertThat(ratings.get(0).getRating(), is(equalTo(1)));
+ assertThat(ratings.get(1).getRating(), is(equalTo(2)));
+ assertThat(ratings.get(2).getRating(), is(equalTo(3)));
+ }
+
+}
diff --git a/spring-amqp-simple/pom.xml b/spring-amqp-simple/pom.xml
index 0cf4ad0e47..f3dfbccaec 100644
--- a/spring-amqp-simple/pom.xml
+++ b/spring-amqp-simple/pom.xml
@@ -1,7 +1,11 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ com.baeldung
+ spring-amqp-simple
+ 1.0.0-SNAPSHOT
+ Spring AMQP Simple App
parent-boot-5
@@ -10,11 +14,6 @@
../parent-boot-5
- com.baeldung
- spring-amqp-simple
- 1.0.0-SNAPSHOT
- Spring AMQP Simple App
-
org.springframework.boot
diff --git a/spring-amqp/pom.xml b/spring-amqp/pom.xml
index 37a1d9e394..a11261084a 100755
--- a/spring-amqp/pom.xml
+++ b/spring-amqp/pom.xml
@@ -1,12 +1,10 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
com.baeldung
springamqp
0.1-SNAPSHOT
jar
-
springamqp
Introduction to Spring-AMQP
@@ -16,10 +14,6 @@
1.0.0-SNAPSHOT
-
- UTF-8
-
-
org.springframework.amqp
@@ -37,4 +31,9 @@
springamqp
+
+
+ UTF-8
+
+
diff --git a/spring-aop/pom.xml b/spring-aop/pom.xml
index 0e8dbe46ce..7cdf9bd7cc 100644
--- a/spring-aop/pom.xml
+++ b/spring-aop/pom.xml
@@ -1,5 +1,5 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
spring-aop
diff --git a/spring-apache-camel/pom.xml b/spring-apache-camel/pom.xml
index df907a34de..4c963fc32c 100644
--- a/spring-apache-camel/pom.xml
+++ b/spring-apache-camel/pom.xml
@@ -1,5 +1,5 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
org.apache.camel
spring-apache-camel
@@ -14,20 +14,12 @@
1.0.0-SNAPSHOT
-
- 2.18.1
- 4.3.4.RELEASE
- 1.8
-
-
-
org.apache.camel
camel-core
${env.camel.version}
-
org.apache.camel
camel-spring
@@ -39,13 +31,11 @@
-
org.apache.camel
camel-stream
${env.camel.version}
-
org.springframework
spring-context
@@ -56,8 +46,13 @@
camel-spring-javaconfig
${env.camel.version}
-
+
+ 2.18.1
+ 4.3.4.RELEASE
+ 1.8
+
+
diff --git a/spring-batch/pom.xml b/spring-batch/pom.xml
index f72024d32b..d274c046e2 100644
--- a/spring-batch/pom.xml
+++ b/spring-batch/pom.xml
@@ -1,12 +1,10 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
com.baeldung
spring-batch
0.1-SNAPSHOT
jar
-
spring-batch
http://maven.apache.org
@@ -16,14 +14,6 @@
1.0.0-SNAPSHOT
-
- UTF-8
- 5.0.3.RELEASE
- 4.0.0.RELEASE
- 3.15.1
- 4.1
-
-
@@ -64,4 +54,13 @@
+
+
+ UTF-8
+ 5.0.3.RELEASE
+ 4.0.0.RELEASE
+ 3.15.1
+ 4.1
+
+
diff --git a/spring-bom/README.md b/spring-bom/README.md
index 10e3502d11..d056216a2e 100644
--- a/spring-bom/README.md
+++ b/spring-bom/README.md
@@ -1,3 +1,3 @@
### Relevant Articles:
-- [Spring with Maven BOM]
+- [Spring with Maven BOM](http://www.baeldung.com/spring-maven-bom)
diff --git a/spring-bom/pom.xml b/spring-bom/pom.xml
index 306632eb21..ddecb9dc0d 100644
--- a/spring-bom/pom.xml
+++ b/spring-bom/pom.xml
@@ -1,27 +1,26 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4.0.0
-
- com.baeldung
- parent-modules
- 1.0.0-SNAPSHOT
-
com.baeldung
spring-bom
1.0.0-SNAPSHOT
spring-bom
http://maven.apache.org
-
- UTF-8
-
+
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+
+
org.springframework
spring-framework-bom
- 4.3.8.RELEASE
+ ${spring-framework-bom.version}
pom
import
@@ -37,4 +36,10 @@
spring-web
+
+
+ UTF-8
+ 4.3.8.RELEASE
+
+
diff --git a/spring-boot-admin/README.md b/spring-boot-admin/README.md
index 622533a6ad..73ce857059 100644
--- a/spring-boot-admin/README.md
+++ b/spring-boot-admin/README.md
@@ -14,4 +14,9 @@ and the mail configuration from application.properties
* mvn clean install
* mvn spring-boot:run
* starts on port 8081
-* basic auth client/client
\ No newline at end of file
+* basic auth client/client
+
+
+### Relevant Articles:
+
+- [A Guide to Spring Boot Admin](http://www.baeldung.com/spring-boot-admin)
diff --git a/spring-boot-admin/pom.xml b/spring-boot-admin/pom.xml
index 9c1eeeabff..d285a01ec5 100644
--- a/spring-boot-admin/pom.xml
+++ b/spring-boot-admin/pom.xml
@@ -11,11 +11,6 @@
1.0.0-SNAPSHOT
-
- UTF-8
- 1.5.8.RELEASE
-
-
spring-boot-admin-server
spring-boot-admin-client
@@ -33,4 +28,9 @@