package com.sf.vertx.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sf.vertx.api.pojo.AppConfig;
import com.sf.vertx.api.pojo.VertxConfig;
import com.sf.vertx.service.AppConfigService;

import lombok.extern.slf4j.Slf4j;

/***
 * 测试redis
 * 
 * @author xy
 *
 */
@RestController
@RequestMapping("/vertx/config")
@Slf4j
public class AppConfigController {
	@Autowired
	private AppConfigService appConfigService;
	
	@PostMapping("/saveAppConfig")
	public String addAppConfig(@RequestBody String appConfig) {
		appConfigService.saveAppConfig(appConfig);
		return "success";
	}
	
	@PostMapping("/saveVertxConfig")
	public String saveVertxConfig(@RequestBody VertxConfig vertxConfig) {
		appConfigService.saveVertxConfig(vertxConfig);
		return "success";
	}
	
	

}
