get dependencies sorted out for spring rest services
This commit is contained in:
18
java/org/owasp/webgoat/service/BaseService.java
Normal file
18
java/org/owasp/webgoat/service/BaseService.java
Normal 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 {
|
||||
|
||||
}
|
29
java/org/owasp/webgoat/service/DummyService.java
Normal file
29
java/org/owasp/webgoat/service/DummyService.java
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user