package com.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class login {
@RequestMapping("/hi")
public String hi() {
System.out.println("Hii");
return "Hi";
}
@ResponseBody
@GetMapping
public String test(){
return "This is a test. If this appears in the browser, something works.";
}
}
////
LoginPage
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
/WEB-INF/Login-servlet.xml
1
LoginPage
/
////
////
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
Insert title here
Hiii
////
4.0.0
LoginPage
LoginPage
0.0.1-SNAPSHOT
war
11
11
11
5.3.18
5.5.4.Final
org.springframework
spring-webmvc
5.3.18
org.springframework
spring-core
5.3.18
org.springframework
spring-context
5.3.18
org.springframework
spring-orm
5.3.18
org.springframework
spring-jdbc
5.3.18
javax.servlet
javax.servlet-api
3.1.0
provided
org.hibernate
hibernate-core
5.5.4.Final
mysql
mysql-connector-java
8.0.27
org.hibernate.validator
hibernate-validator
6.2.0.Final
org.slf4j
slf4j-api
1.7.32
ch.qos.logback
logback-classic
1.2.10
org.apache.maven.plugins
maven-compiler-plugin
3.8.1
11
11
maven-war-plugin
3.2.3