Demo entry 6361375

abc

   

Submitted by anonymous on May 04, 2017 at 06:48
Language: Java. Code size: 1.4 kB.

package kr.co.tworld.freebill.controller;

import java.util.HashMap;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import kr.co.tworld.freebill.service.FreeBillService;

@RestController
public class FreeBillController {
	
	@Resource(name="redisTemplate")
    private RedisTemplate<String, Object> redisTemplate;
	
    @Autowired
    private FreeBillService freeBillService;
    
    @RequestMapping(value="/freebill/detail")
    public HashMap getFreeBillDetail(@RequestParam("tokenId") String token){
    	HashMap result = freeBillService.getFreeBillDetail(token);
    	return result;
    } 

	@RequestMapping("/freebill/main")
	public HashMap getFreeBillMain(@RequestParam("tokenId") String token){
		HashMap result = freeBillService.freeBillMain(token);
		return result;
	} 
   
	@RequestMapping("/freebill/hystrixtest")
	public ResponseEntity<String> getHystrixTest(@RequestParam("tokenId") String token){
		ResponseEntity<String> result = freeBillService.getHystrixTest(token);
		return result;
	}
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).