my old projects are working fine after I created new projects not even one new works now

**with this the database is created but inside database the table is not created. also when I run spring boot I see no sql queries being run in console.

this doesn't happen in old projects.

I'm using STS

I tried using spring initializr still same problem. I tried using intellij. I tried adding other dependencies also but didn't get solved.**

My pom.xml file

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.2.2</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>commerce</artifactId>
    <version>2</version>
    <name>commerce</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>17</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>

            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

My application.properties file





#data config
spring.datasource.url = jdbc:mysql://localhost:3306/ecommerce?createDatabaseIfNotExist=true
spring.datasource.username= root
spring.datasource.password= root

#jpa hibernate config

spring.jpa.hibernate.ddl-auto=update


spring.jpa.show-sql=true
spring.jpa.database=mysql
spring.data.jpa.repositories.enabled=true


my colsole log file

[32m :: Spring Boot :: [39m              [2m (v3.2.2)[0;39m

[2m2024-01-20T23:21:37.465+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.example.demo.CommerceApplication    [0;39m [2m:[0;39m Starting CommerceApplication using Java 17.0.9 with PID 16920 (C:\Users\coola\Documents\workspace-spring-tool-suite-4-4.21.0.RELEASE\commerce\target\classes started by coola in C:\Users\coola\Documents\workspace-spring-tool-suite-4-4.21.0.RELEASE\commerce)
[2m2024-01-20T23:21:37.469+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.example.demo.CommerceApplication    [0;39m [2m:[0;39m No active profile set, falling back to 1 default profile: "default"
[2m2024-01-20T23:21:37.544+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36m.e.DevToolsPropertyDefaultsPostProcessor[0;39m [2m:[0;39m Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
[2m2024-01-20T23:21:37.544+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36m.e.DevToolsPropertyDefaultsPostProcessor[0;39m [2m:[0;39m For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
[2m2024-01-20T23:21:38.263+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36m.s.d.r.c.RepositoryConfigurationDelegate[0;39m [2m:[0;39m Bootstrapping Spring Data JPA repositories in DEFAULT mode.
[2m2024-01-20T23:21:38.292+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36m.s.d.r.c.RepositoryConfigurationDelegate[0;39m [2m:[0;39m Finished Spring Data repository scanning in 16 ms. Found 0 JPA repository interfaces.
[2m2024-01-20T23:21:38.860+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m:[0;39m Tomcat initialized with port 8080 (http)
[2m2024-01-20T23:21:38.874+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.apache.catalina.core.StandardService  [0;39m [2m:[0;39m Starting service [Tomcat]
[2m2024-01-20T23:21:38.874+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.apache.catalina.core.StandardEngine   [0;39m [2m:[0;39m Starting Servlet engine: [Apache Tomcat/10.1.18]
[2m2024-01-20T23:21:38.955+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.a.c.c.C.[Tomcat].[localhost].[/]      [0;39m [2m:[0;39m Initializing Spring embedded WebApplicationContext
[2m2024-01-20T23:21:38.955+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mw.s.c.ServletWebServerApplicationContext[0;39m [2m:[0;39m Root WebApplicationContext: initialization completed in 1410 ms
[2m2024-01-20T23:21:39.130+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.hibernate.jpa.internal.util.LogHelper [0;39m [2m:[0;39m HHH000204: Processing PersistenceUnitInfo [name: default]
[2m2024-01-20T23:21:39.195+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36morg.hibernate.Version                   [0;39m [2m:[0;39m HHH000412: Hibernate ORM core version 6.4.1.Final
[2m2024-01-20T23:21:39.237+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.h.c.internal.RegionFactoryInitiator   [0;39m [2m:[0;39m HHH000026: Second-level cache disabled
[2m2024-01-20T23:21:39.581+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.s.o.j.p.SpringPersistenceUnitInfo     [0;39m [2m:[0;39m No LoadTimeWeaver setup: ignoring JPA class transformer
[2m2024-01-20T23:21:39.621+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.zaxxer.hikari.HikariDataSource      [0;39m [2m:[0;39m HikariPool-1 - Starting...
[2m2024-01-20T23:21:39.991+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.zaxxer.hikari.pool.HikariPool       [0;39m [2m:[0;39m HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@147f7b37
[2m2024-01-20T23:21:39.994+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.zaxxer.hikari.HikariDataSource      [0;39m [2m:[0;39m HikariPool-1 - Start completed.
[2m2024-01-20T23:21:40.073+05:45[0;39m [33m WARN[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36morg.hibernate.orm.deprecation           [0;39m [2m:[0;39m HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
[2m2024-01-20T23:21:40.488+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.h.e.t.j.p.i.JtaPlatformInitiator      [0;39m [2m:[0;39m HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
[2m2024-01-20T23:21:40.494+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mj.LocalContainerEntityManagerFactoryBean[0;39m [2m:[0;39m Initialized JPA EntityManagerFactory for persistence unit 'default'
[2m2024-01-20T23:21:40.551+05:45[0;39m [33m WARN[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mJpaBaseConfiguration$JpaWebConfiguration[0;39m [2m:[0;39m spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
[2m2024-01-20T23:21:40.955+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.s.b.d.a.OptionalLiveReloadServer      [0;39m [2m:[0;39m LiveReload server is running on port 35729
[2m2024-01-20T23:21:40.998+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.s.b.w.embedded.tomcat.TomcatWebServer [0;39m [2m:[0;39m Tomcat started on port 8080 (http) with context path ''
[2m2024-01-20T23:21:41.011+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.example.demo.CommerceApplication    [0;39m [2m:[0;39m Started CommerceApplication in 3.985 seconds (process running for 4.934)

I think It's coming from here but I don't know how to solve it

[2m2024-01-20T23:21:39.237+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.h.c.internal.RegionFactoryInitiator   [0;39m [2m:[0;39m HHH000026: Second-level cache disabled
[2m2024-01-20T23:21:39.581+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.s.o.j.p.SpringPersistenceUnitInfo     [0;39m [2m:[0;39m No LoadTimeWeaver setup: ignoring JPA class transformer
[2m2024-01-20T23:21:39.621+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.zaxxer.hikari.HikariDataSource      [0;39m [2m:[0;39m HikariPool-1 - Starting...
[2m2024-01-20T23:21:39.991+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.zaxxer.hikari.pool.HikariPool       [0;39m [2m:[0;39m HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@147f7b37
[2m2024-01-20T23:21:39.994+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mcom.zaxxer.hikari.HikariDataSource      [0;39m [2m:[0;39m HikariPool-1 - Start completed.
[2m2024-01-20T23:21:40.073+05:45[0;39m [33m WARN[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36morg.hibernate.orm.deprecation           [0;39m [2m:[0;39m HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
[2m2024-01-20T23:21:40.488+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mo.h.e.t.j.p.i.JtaPlatformInitiator      [0;39m [2m:[0;39m HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
[2m2024-01-20T23:21:40.494+05:45[0;39m [32m INFO[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mj.LocalContainerEntityManagerFactoryBean[0;39m [2m:[0;39m Initialized JPA EntityManagerFactory for persistence unit 'default'
[2m2024-01-20T23:21:40.551+05:45[0;39m [33m WARN[0;39m [35m16920[0;39m [2m---[0;39m [2m[  restartedMain][0;39m [2m[0;39m[36mJpaBaseConfiguration$JpaWebConfiguration[0;39m [2m:[0;39m spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

**I tried using spring initializr still same problem. I tried using intellij. I tried adding other dependencies also but didn't get solved

creating new project with difference version reinstall mysql**

0

There are 0 best solutions below