get dependencies sorted out for spring rest services

This commit is contained in:
lawson89
2014-06-20 07:48:03 -04:00
parent 39d5888ef3
commit df68764e2c
5 changed files with 62 additions and 3 deletions

View File

@ -0,0 +1,18 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.owasp.webgoat.service;
import org.springframework.web.bind.annotation.RequestMapping;
/**
*
* @author rlawson
*/
@RequestMapping("/service")
public abstract class BaseService {
}

View File

@ -0,0 +1,29 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.owasp.webgoat.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
*
* @author rlawson
*/
@Controller
public class DummyService extends BaseService{
@RequestMapping(value = "/first.do", produces = "application/json")
public @ResponseBody
List<String> firstNames() {
List<String> test = new ArrayList<String>();
test.add("one");
test.add("two)");
return test;
}
}