com.orchestra.portale.controller.WelcomeController.java Source code

Java tutorial

Introduction

Here is the source code for com.orchestra.portale.controller.WelcomeController.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 com.orchestra.portale.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * @author mekko
 */
@Controller
public class WelcomeController {

    @Autowired
    MongoOperations mongoOps;

    @RequestMapping("/welcome")
    public ModelAndView welcomePage() {
        ModelAndView model = new ModelAndView("welcome");
        model.addObject("obj", new Oggetto());
        return model;
    }
}