My controller is not getting mapped in the console.
My main class Application
package com.ruchi.web.sbfirst;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SbFirstApplication {
public static void main(String[] args) {
SpringApplication.run(SbFirstApplication.class, args);
}
}
LoginController
package com.ruchi.web.sbfirst.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class LoginController {
@RequestMapping("/login")
public String loginMessage() {
return "Hello";
}
}
See Question&Answers more detail:os