DevInfoController.java 1.62 KB
package org.emercit.app;

import java.util.Locale;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.*;
import javax.servlet.ServletContext;

import java.io.*;

import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ModelAttribute;
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.RequestParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Vector;

import org.emercit.service.DevInfoService;


import org.emercit.devinfo.model.DevInfoBean;



@Controller
@RequestMapping("api")
public class DevInfoController {
	
	
	@RequestMapping(value = "devinfo",  method = RequestMethod.GET)
	public @ResponseBody DevInfoBean getDevInfo() {
		
	
			return DevInfoService.INSTANCE.get();
		
	}


	

	 @RequestMapping(value="devinfo/update" , method = RequestMethod.POST)
	    public @ResponseBody boolean update(@RequestBody DevInfoBean m) {
	    
			return DevInfoService.INSTANCE.set(m);
		 
	    }
}