furthe example work

This commit is contained in:
eugenp
2014-01-09 18:11:32 +02:00
parent 36d843329e
commit 05cf9b7541
5 changed files with 54 additions and 50 deletions

View File

@@ -6,10 +6,10 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@EnableWebMvc
@Configuration
@ComponentScan({ "org.baeldung.controller" })
public class MvcConfig {
@ComponentScan({ "org.baeldung.web" })
public class WebConfig {
public MvcConfig() {
public WebConfig() {
super();
}

View File

@@ -1,4 +1,4 @@
package org.baeldung.controller;
package org.baeldung.web.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
@@ -7,9 +7,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class BarController {
public class BarMappingExamplesController {
public BarController() {
public BarMappingExamplesController() {
super();
}

View File

@@ -1,4 +1,4 @@
package org.baeldung.controller;
package org.baeldung.web.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
@@ -7,15 +7,15 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class FooController {
public class FooMappingExamplesController {
public FooController() {
public FooMappingExamplesController() {
super();
}
// API
// by paths
// mapping examples
@RequestMapping(value = "/foos")
@ResponseBody