diff --git a/guava/.classpath b/guava/.classpath index eed10d8a8b..506df5d23a 100644 --- a/guava/.classpath +++ b/guava/.classpath @@ -22,15 +22,14 @@ - + - + - diff --git a/guava/.project b/guava/.project index 1d5b25f53a..48be966b70 100644 --- a/guava/.project +++ b/guava/.project @@ -20,11 +20,6 @@ - - org.springframework.ide.eclipse.core.springbuilder - - - org.eclipse.m2e.core.maven2Builder @@ -32,7 +27,6 @@ - org.springframework.ide.eclipse.core.springnature org.eclipse.jem.workbench.JavaEMFNature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jdt.core.javanature diff --git a/guava/.settings/org.eclipse.jdt.core.prefs b/guava/.settings/org.eclipse.jdt.core.prefs index 723e5b1245..13a7473657 100644 --- a/guava/.settings/org.eclipse.jdt.core.prefs +++ b/guava/.settings/org.eclipse.jdt.core.prefs @@ -5,9 +5,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -92,4 +92,4 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/guava/pom.xml b/guava/pom.xml index d4c58cd7bb..cea3540394 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -1,158 +1,139 @@ - - 4.0.0 - org.baeldung - spring-rest - 0.1-SNAPSHOT + + 4.0.0 + org.baeldung + spring-rest + 0.1-SNAPSHOT - spring-rest - war + spring-rest - + - + - - org.springframework - spring-web - ${org.springframework.version} - - - org.springframework - spring-webmvc - ${org.springframework.version} - + + com.google.guava + guava + 15.0 + - + - - javax.servlet - javax.servlet-api - 3.0.1 - provided - + - - javax.servlet - jstl - 1.2 - runtime - + + junit + junit-dep + ${junit.version} + test + - + + org.hamcrest + hamcrest-core + ${org.hamcrest.version} + test + + + org.hamcrest + hamcrest-library + ${org.hamcrest.version} + test + - - junit - junit-dep - ${junit.version} - test - + + org.mockito + mockito-core + ${mockito.version} + test + - - org.hamcrest - hamcrest-core - ${org.hamcrest.version} - test - - - org.hamcrest - hamcrest-library - ${org.hamcrest.version} - test - + - - org.mockito - mockito-core - ${mockito.version} - test - + + spring-rest + + + src/main/resources + true + + - + - - spring-rest - - - src/main/resources - true - - + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + + + + + + + - + + org.codehaus.cargo + cargo-maven2-plugin + ${cargo-maven2-plugin.version} + + true + + jetty8x + embedded + + + + + + + 8082 + + + + - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - - - - - - - + - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo-maven2-plugin.version} - - true - - jetty8x - embedded - - - - - - - 8082 - - - - + - + + + 3.2.4.RELEASE + 3.1.4.RELEASE - + + 4.2.4.Final + 5.1.26 - - - 3.2.4.RELEASE - 3.1.4.RELEASE + + 1.7.5 + 1.0.11 - - 4.2.4.Final - 5.1.26 + + 5.0.1.Final - - 1.7.5 - 1.0.11 + + 15.0 + 3.1 - - 5.0.1.Final + + 1.3 + 4.11 + 1.9.5 - - 14.0.1 - 3.1 + 4.2.4 + 4.2.5 - - 1.3 - 4.11 - 1.9.5 + 1.8.1 + 1.8.9 - 4.2.4 - 4.2.5 - - 1.8.1 - 1.8.9 - - - 1.4.3 - 2.16 - + + 1.4.3 + 2.16 + \ No newline at end of file diff --git a/guava/src/main/java/org/baeldung/config/MvcConfig.java b/guava/src/main/java/org/baeldung/config/MvcConfig.java deleted file mode 100644 index 18924ad855..0000000000 --- a/guava/src/main/java/org/baeldung/config/MvcConfig.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.baeldung.config; - -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; - -@EnableWebMvc -@Configuration -@ComponentScan({ "org.baeldung.controller" }) -public class MvcConfig { - - public MvcConfig() { - super(); - } - -} \ No newline at end of file diff --git a/guava/src/main/java/org/baeldung/controller/BarController.java b/guava/src/main/java/org/baeldung/controller/BarController.java deleted file mode 100644 index d85c410862..0000000000 --- a/guava/src/main/java/org/baeldung/controller/BarController.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.baeldung.controller; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -public class BarController { - - public BarController() { - super(); - } - - // API - - // with @RequestParam - - @RequestMapping(value = "/bars") - @ResponseBody - public String getBarBySimplePathWithRequestParam(@RequestParam("id") final long id) { - return "Get a specific Bar with id=" + id; - } - - @RequestMapping(value = "/bars", params = "id") - @ResponseBody - public String getBarBySimplePathWithExplicitRequestParam(@RequestParam("id") final long id) { - return "Get a specific Bar with id=" + id; - } - - @RequestMapping(value = "/bars", params = { "id", "second" }) - @ResponseBody - public String getBarBySimplePathWithExplicitRequestParams(@RequestParam("id") final long id) { - return "Get a specific Bar with id=" + id; - } - - // with @PathVariable - - @RequestMapping(value = "/bars/{numericId:[\\d]+}") - @ResponseBody - public String getBarsBySimplePathWithPathVariable(@PathVariable final long numericId) { - return "Get a specific Bar with id=" + numericId; - } - -} diff --git a/guava/src/main/java/org/baeldung/controller/FooController.java b/guava/src/main/java/org/baeldung/controller/FooController.java deleted file mode 100644 index 292f46729a..0000000000 --- a/guava/src/main/java/org/baeldung/controller/FooController.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.baeldung.controller; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -public class FooController { - - public FooController() { - super(); - } - - // API - - // by paths - - @RequestMapping(value = "/foos") - @ResponseBody - public String getFoosBySimplePath() { - return "Simple Get some Foos"; - } - - // with @PathVariable - - @RequestMapping(value = "/foos/{id}") - @ResponseBody - public String getFoosBySimplePathWithPathVariable(@PathVariable final long id) { - return "Get a specific Foo with id=" + id; - } - - @RequestMapping(value = "/foos/{fooid}/bar/{barid}") - @ResponseBody - public String getFoosBySimplePathWithPathVariables(@PathVariable final long fooid, @PathVariable final long barid) { - return "Get a specific Bar with id=" + barid + " from a Foo with id=" + fooid; - } - - // other HTTP verbs - - @RequestMapping(value = "/foos", method = RequestMethod.POST) - @ResponseBody - public String postFoos() { - return "Post some Foos"; - } - - // with headers - - @RequestMapping(value = "/foos", headers = "key=val") - @ResponseBody - public String getFoosWithHeader() { - return "Get some Foos with Header"; - } - - @RequestMapping(value = "/foos", headers = { "key1=val1", "key2=val2" }) - @ResponseBody - public String getFoosWithHeaders() { - return "Get some Foos with Header"; - } - - @RequestMapping(value = "/foos", produces = { "application/json", "application/xml" }) - @ResponseBody - public String getFoosAsJsonFromREST() { - return "Get some Foos with Header Exact"; - } - - // advanced - multiple mappings - - @RequestMapping(value = { "/advanced/bars", "/advanced/foos" }) - @ResponseBody - public String getFoosOrBarsByPath() { - return "Advanced - Get some Foos or Bars"; - } - - @RequestMapping(value = "*") - @ResponseBody - public String getFallback() { - return "Fallback for GET Requests"; - } - - @RequestMapping(value = "*", method = { RequestMethod.GET, RequestMethod.POST }) - @ResponseBody - public String allFallback() { - return "Fallback for All Requests"; - } - - @RequestMapping(value = "/foos/multiple", method = { RequestMethod.PUT, RequestMethod.POST }) - @ResponseBody - public String putAndPostFoos() { - return "Advanced - PUT and POST within single method"; - } - -}