package br.com.caelum.contas.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class OlaMundoControler {
//http://localhost:8080/contas/olaMundoSpring
@RequestMapping("/olaMundoSpring")
public String mostrar() {
System.out.println("daiene");
return "dai-ok";
}
}
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>daiene teste</title>
</head>
<body>
<h2> sucesso </h2>
</body>
</html>