I don´t have any idea if it´s missing something for this to start work. I´ve created all enviroment and system variables, downloaded repository, downloaded and configured the database and finally when I tried my "Hello Word" it didn´t work. Never sttoped at the breakpoint either.
I have one simple controller with a method
@Controller
public class HomeController {
@RequestMapping("/")
@ResponseBody
public String index() {
System.out.println("Log");
return "Welcome!";
}
}
my properties has only this
# data source
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost/fj27_spring?
createDatabaseIfNotExist=true&useSSL=false&allowPublicKeyRetrieval=true&useTimezone=true&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=xxxxxx
# jpa properties
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL55Dialect
spring.jpa.properties.hibernate.show_sql=true
spring.jpa.properties.hibernate.format_sql=true
and when I run my application I got this
2020-07-13 15:28:48.537 INFO 16524 --- [ main] com.example.teste.TesteApplication :
Started TesteApplication in 3.411 seconds (JVM running for 4.086)
2020-07-13 15:28:48.797 INFO 16524 --- [ task-1] com.zaxxer.hikari.HikariDataSource :
HikariPool-1 - Start completed.
2020-07-13 15:28:48.819 INFO 16524 --- [ task-1] org.hibernate.dialect.Dialect :
HHH000400: Using dialect: org.hibernate.dialect.MySQL55Dialect
2020-07-13 15:28:49.171 INFO 16524 --- [ task-1] o.h.e.t.j.p.i.JtaPlatformInitiator :
HHH000490: Using JtaPlatform implementation:
[org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-07-13 15:28:49.179 INFO 16524 --- [ task-1] j.LocalContainerEntityManagerFactoryBean :
Initialized JPA EntityManagerFactory for persistence unit 'default'
So everything seems ok, but when I run my application and open http://localhost:8080/, I never get there, it never goes to the controller to put the message, the front gives me a return of 404 and the default spring error page. I don´t know if it´s something I missed because the error only appears when I open the page, not on compiling, building or when it´s starting running. I get the 404 but the Eclipse Console got nothing new.