Good afternoon developers, I'm starting in the world of Spring Boot, I created a simple Spring called AppSqlServerApplication with the Spring Initializr ( link ), The question is that I want to order the application for packages com.example.AppSqlServer, controllers, and entities. Inside the package com.example.AppSqlServer is the main class that starts the application, the problem is that when I create a UserController class inside the controllers package, I do not run, but I pass this class ("UserController") to the com package. example.AppSqlServer where the main class is if executed. Can someone tell me how to solve this? Thank you... This is the file structure:
package controllers;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class UserController {
public UserController() {
}
@GetMapping(value = "/homeUser")
public String HomeUser() {
return "Hello User";
}
}