com.ventura24.lv.CustomerController.java Source code

Java tutorial

Introduction

Here is the source code for com.ventura24.lv.CustomerController.java

Source

/******************************************************************************
 * Copyright (C) 2005 - 2016 Ventura24 S.L.U.                                *
 * *
 * Copyright and license details are included in Ventura24 license file.     *
 ******************************************************************************/
package com.ventura24.lv;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;

/**
 *****************************************************************************
 *  Copyright (C) 2005 - 2016 Ventura24 S.L.U.                                *
 *                                                                            *
 *  Copyright and license details are included in Ventura24 license file.     *
 ******************************************************************************
 * Created by jsanc on 11/02/16.
 */
@RestController
@RequestMapping(path = "/customer")
public class CustomerController {

    @RequestMapping(method = RequestMethod.GET)
    public ResponseEntity<?> findAllCustomers() {
        return ResponseEntity.ok(new Customer(BigDecimal.TEN, 1L, "name"));
    }
}