Connection Error between Spring Boot and MySQL :
Application Properties:
spring.datasource.url=jdbc:mysql://localhost:3306/ems
spring.datasource.username=root
spring.datasource.password=admin1234
server.port = 5045
spring.jpa.properties..dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.hibernate.ddl-auto=update
when i run this code, it doesn't make any table in mySql (ems database)
14 Replies
⌛
This post has been reserved for your question.
Hey @DigitalDynamo! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Can you please show the full stack trace?
this is my output
table doesn't show any feilds
package entity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.*;
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="Employee")
This message has been formatted automatically. You can disable this using
/preferences
.Did you click the refresh button on the top right?
yup
Entity classes must be in a subpackage of your main class
may be this is wrong ??
the entity package must be imside com.example.demo
and the other packages should be as well
oo i see thanks alot
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
i will try then tell you
Post Closed
This post has been closed by <@805083232369770526>.