tarefas.controller.WebServicesController.java Source code

Java tutorial

Introduction

Here is the source code for tarefas.controller.WebServicesController.java

Source

/*
 * 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 tarefas.controller;

import java.sql.SQLException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author caoc1
 */
@RestController
public class WebServicesController {
    @RequestMapping("/getFastestWay_admin.htm")
    public String getFastestWay(HttpServletResponse response) throws ClassNotFoundException, SQLException {
        DAOController db = new DAOController();
        response.setStatus(200);
        return db.getFastestWay();
    }
}