org.cartno.web.LicenseController.java Source code

Java tutorial

Introduction

Here is the source code for org.cartno.web.LicenseController.java

Source

package org.cartno.web;

import java.util.List;

import org.cartno.domain.Area;
import org.cartno.service.FetchingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class LicenseController {
    @Autowired
    private FetchingService fetchingService;

    @RequestMapping(value = "/license/select", method = RequestMethod.GET)
    public void select(Model model) {
        List<Area> area = fetchingService.findAllAreas();
        model.addAttribute(area);
    }
}