diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index ab03429..2a244de 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -3,13 +3,11 @@
-
-
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/logs/app.log b/logs/app.log
index 8ceffbf..c2e6d43 100644
--- a/logs/app.log
+++ b/logs/app.log
@@ -4,7 +4,7 @@
2024-08-27 00:52:23 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-27 00:52:23 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-27 00:52:23 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-27 00:52:23 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-27 00:52:23 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-27 00:52:23 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-27 00:52:23 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-27 00:52:24 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -15,7 +15,7 @@
2024-08-27 00:52:56 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-27 00:52:56 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-27 00:52:56 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-27 00:52:56 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-27 00:52:56 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-27 00:52:56 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-27 00:52:56 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-27 00:52:56 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -26,7 +26,7 @@
2024-08-27 00:54:30 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-27 00:54:30 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-27 00:54:30 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-27 00:54:30 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-27 00:54:30 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-27 00:54:30 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-27 00:54:30 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-27 00:54:31 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -38,7 +38,7 @@
2024-08-27 00:58:17 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-27 00:58:17 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-27 00:58:17 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-27 00:58:17 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-27 00:58:17 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-27 00:58:17 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-27 00:58:17 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-27 00:58:17 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -50,7 +50,7 @@
2024-08-27 01:02:48 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-27 01:02:48 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-27 01:02:48 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-27 01:02:48 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-27 01:02:48 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-27 01:02:48 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-27 01:02:48 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-27 01:02:48 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -62,7 +62,7 @@
2024-08-27 08:49:52 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-27 08:49:52 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-27 08:49:52 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-27 08:49:52 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-27 08:49:52 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-27 08:49:52 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-27 08:49:52 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-27 08:49:52 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -74,7 +74,7 @@
2024-08-27 09:00:04 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-27 09:00:04 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-27 09:00:04 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-27 09:00:04 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-27 09:00:04 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-27 09:00:04 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-27 09:00:04 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-27 09:00:04 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -86,7 +86,7 @@
2024-08-27 09:00:45 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-27 09:00:45 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-27 09:00:45 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-27 09:00:45 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-27 09:00:45 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-27 09:00:45 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-27 09:00:45 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-27 09:00:45 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -98,7 +98,7 @@
2024-08-29 17:09:39 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-29 17:09:39 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-29 17:09:39 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-29 17:09:39 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-29 17:09:39 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-29 17:09:39 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-29 17:09:39 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-29 17:09:39 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -111,7 +111,7 @@
2024-08-29 17:17:33 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-29 17:17:33 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-29 17:17:33 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-29 17:17:33 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-29 17:17:33 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-29 17:17:33 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-29 17:17:33 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-29 17:17:33 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
@@ -123,9 +123,94 @@
2024-08-29 17:19:43 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
2024-08-29 17:19:43 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
2024-08-29 17:19:43 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
-2024-08-29 17:19:43 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, user=lcaohoanq}
+2024-08-29 17:19:43 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
2024-08-29 17:19:43 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
2024-08-29 17:19:43 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
2024-08-29 17:19:43 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
2024-08-29 17:19:44 INFO o.h.e.t.j.p.i.JtaPlatformInitiator - HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
2024-08-29 17:19:44 INFO o.hibernate.orm.connections.access - HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@1d91bfa] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
+2024-08-30 11:19:09 INFO o.h.jpa.internal.util.LogHelper - HHH000204: Processing PersistenceUnitInfo [name: JFXSGPU]
+2024-08-30 11:19:09 INFO org.hibernate.Version - HHH000412: Hibernate ORM core version [WORKING]
+2024-08-30 11:19:09 INFO o.h.c.i.RegionFactoryInitiator - HHH000026: Second-level cache disabled
+2024-08-30 11:19:09 WARN o.hibernate.orm.connections.pooling - HHH10001002: Using built-in connection pool (not intended for production use)
+2024-08-30 11:19:09 INFO o.hibernate.orm.connections.pooling - HHH10001005: Loaded JDBC driver class: com.mysql.cj.jdbc.Driver
+2024-08-30 11:19:09 INFO o.hibernate.orm.connections.pooling - HHH10001012: Connecting with JDBC URL [jdbc:mysql://localhost:3307/snake_game_app]
+2024-08-30 11:19:09 INFO o.hibernate.orm.connections.pooling - HHH10001001: Connection properties: {password=****, userDTO=lcaohoanq}
+2024-08-30 11:19:09 INFO o.hibernate.orm.connections.pooling - HHH10001003: Autocommit mode: false
+2024-08-30 11:19:09 INFO o.hibernate.orm.connections.pooling - HHH10001115: Connection pool size: 20 (min=1)
+2024-08-30 11:19:09 WARN o.h.e.j.e.i.JdbcEnvironmentInitiator - HHH000342: Could not obtain connection to query metadata
+java.lang.IllegalStateException: Cannot get a connection as the driver manager is not properly initialized
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:260)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:437)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:61)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:290)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:123)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:77)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.ServiceRegistry.requireService(ServiceRegistry.java:68)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:52)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:136)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:247)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.convertSqlException(BasicConnectionCreator.java:133)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:43)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.createConnection(BasicConnectionCreator.java:61)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections.addConnections(DriverManagerConnectionProviderImpl.java:500)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections.(DriverManagerConnectionProviderImpl.java:373)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections$Builder.build(DriverManagerConnectionProviderImpl.java:551)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.buildPool(DriverManagerConnectionProviderImpl.java:102)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:82)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:136)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:247)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.ServiceRegistry.requireService(ServiceRegistry.java:68)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:404)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:276)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:123)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:77)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:130)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:238)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:215)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.boot.model.relational.Database.(Database.java:45)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:221)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:189)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:171)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1431)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1502)
+ at org.hibernate.orm.core@6.5.2.Final/org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:55)
+ at jakarta.persistence@3.1.0/jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:80)
+ at jakarta.persistence@3.1.0/jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.modules.userDTO.UserDAO.(UserDAO.java:20)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.modules.userDTO.UserDAO.getInstance(UserDAO.java:27)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.controllers.ScoreController.(ScoreController.java:20)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.views.ScoreView.(ScoreView.java:27)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.views.base.MyFrame.doAction(MyFrame.java:184)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.views.SwingLoginView.doAction(SwingLoginView.java:143)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.views.base.MyFrame.initUI(MyFrame.java:39)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.views.base.MyFrame.(MyFrame.java:34)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.views.SwingLoginView.(SwingLoginView.java:33)
+ at com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.views.MenuView$LogOut.lambda$actionPerformed$0(MenuView.java:253)
+ at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
+ at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
+ at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
+ at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
+ at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
+ at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
+ at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
+ at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
+ at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
+ at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
+ at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
+ at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
+ at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
+2024-08-30 11:19:09 WARN org.hibernate.orm.deprecation - HHH90000025: MySQLDialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
+2024-08-30 11:19:09 WARN o.h.e.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 08S01
+2024-08-30 11:19:09 ERROR o.h.e.jdbc.spi.SqlExceptionHelper - Communications link failure
+
+The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
+2024-08-30 15:10:15 INFO c.l.fxsnakegame.views.base.Board - Update score successfully
+2024-08-30 15:14:20 INFO c.l.fxsnakegame.views.base.Board - Update score successfully
diff --git a/mvnw.cmd b/mvnw.cmd
index 1d8ab01..67e6de0 100644
--- a/mvnw.cmd
+++ b/mvnw.cmd
@@ -43,7 +43,7 @@ title %0
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
-@REM Execute a user defined script before this one
+@REM Execute a userDTO defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
diff --git a/pom.xml b/pom.xml
index 7d6f928..bccea83 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,12 +41,6 @@
${junit.version}test
-
-
- com.mysql
- mysql-connector-j
- 8.0.33
- org.swinglabs
@@ -144,15 +138,15 @@
- src/main/resources/com/lcaohoanq/formhandling/
+ src/main/resources/com/lcaohoanq/fxsnakegame/false**.fxml
- ${project.build.outputDirectory}/com/lcaohoanq/formhandling
+ ${project.build.outputDirectory}/com/lcaohoanq/fxsnakegame
- src/main/resources/com/lcaohoanq/formhandling/assets/img
+ src/main/resources/com/lcaohoanq/fxsnakegame/assets/imgfalse**.png
@@ -160,7 +154,7 @@
${project.build.outputDirectory}/assets/img
- src/main/resources/com/lcaohoanq/formhandling/assets/sound
+ src/main/resources/com/lcaohoanq/fxsnakegame/assets/soundfalse**.wav
@@ -168,7 +162,7 @@
${project.build.outputDirectory}/assets/sound
- src/main/resources/com/lcaohoanq/formhandling/templates/email
+ src/main/resources/com/lcaohoanq/fxsnakegame/templates/emailfalse**.html
@@ -176,20 +170,12 @@
${project.build.outputDirectory}/templates/email
- src/main/resources/com/lcaohoanq/formhandling
+ src/main/resources/com/lcaohoanq/fxsnakegamefalselogback.xml
-
- src/main/resources/com/lcaohoanq/formhandling/META-INF
- false
-
- persistence.xml
-
- META-INF
-
@@ -200,7 +186,7 @@
- com.lcaohoanq.formhandling.Main
+ com.lcaohoanq.fxsnakegame.Main
@@ -251,15 +237,6 @@
${basedir}/src/main/webapp
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.11.0
-
-
- 18
-
- org.openjfxjavafx-maven-plugin
@@ -269,7 +246,7 @@
default-cli
- com.lcaohoanq.formhandling/com.lcaohoanq.formhandling.Main
+ com.lcaohoanq.fxsnakegame/com.lcaohoanq.fxsnakegame.Main
appapp
diff --git a/src/main/java/com/lcaohoanq/formhandling/exceptions/DBException.java b/src/main/java/com/lcaohoanq/formhandling/exceptions/DBException.java
deleted file mode 100644
index 0370dd4..0000000
--- a/src/main/java/com/lcaohoanq/formhandling/exceptions/DBException.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.lcaohoanq.formhandling.exceptions;
-
-import java.sql.SQLException;
-
-public class DBException extends SQLException {
- public DBException(String message) {
- super(message);
- }
-}
diff --git a/src/main/java/com/lcaohoanq/formhandling/exceptions/DataException.java b/src/main/java/com/lcaohoanq/formhandling/exceptions/DataException.java
deleted file mode 100644
index ba65e3a..0000000
--- a/src/main/java/com/lcaohoanq/formhandling/exceptions/DataException.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.lcaohoanq.formhandling.exceptions;
-
-public class DataException extends Exception {
- public DataException(String message) {
- super(message);
- }
-}
diff --git a/src/main/java/com/lcaohoanq/formhandling/exceptions/FileException.java b/src/main/java/com/lcaohoanq/formhandling/exceptions/FileException.java
deleted file mode 100644
index 72b9cc2..0000000
--- a/src/main/java/com/lcaohoanq/formhandling/exceptions/FileException.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.lcaohoanq.formhandling.exceptions;
-
-public class FileException extends Exception {
- public FileException(String message) {
- super(message);
- }
-}
diff --git a/src/main/java/com/lcaohoanq/formhandling/models/LoginModel.java b/src/main/java/com/lcaohoanq/formhandling/models/LoginModel.java
deleted file mode 100644
index 1aa48ba..0000000
--- a/src/main/java/com/lcaohoanq/formhandling/models/LoginModel.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.lcaohoanq.formhandling.models;
-
-import com.lcaohoanq.formhandling.exceptions.DataException;
-import com.lcaohoanq.formhandling.modules.user.UserDAO;
-import com.lcaohoanq.formhandling.modules.user.UserEntity;
-import com.lcaohoanq.formhandling.utils.PBKDF2;
-
-public record LoginModel(String username, String password) {
- public LoginModel() {
- this("", "");
- }
-
- public boolean isAdmin(String username, String password) {
- return username.equals("admin") && password.equals("admin");
- }
-
- public boolean isMatching(String username, String password) {
- UserEntity db;
- UserDAO executeQuery = UserDAO.getInstance();
- try {
- db = executeQuery.selectEmailAndPasswordByEmail(username);
- if (db != null) {
- return new PBKDF2().authenticate(password.toCharArray(), db.getPassword());
- } else {
- throw new DataException("Error authenticate, password do not match");
- }
- } catch (Exception e) {
- System.out.println(e.getMessage());
- }
- return false;
- }
-
- public boolean isEmpty(String username, String password) {
- return username.isEmpty() || password.isEmpty();
- }
-}
diff --git a/src/main/java/com/lcaohoanq/formhandling/modules/phone/PhoneUtils.java b/src/main/java/com/lcaohoanq/formhandling/modules/phone/PhoneUtils.java
deleted file mode 100644
index 52d4c5e..0000000
--- a/src/main/java/com/lcaohoanq/formhandling/modules/phone/PhoneUtils.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.lcaohoanq.formhandling.modules.phone;
-
-public class PhoneUtils {
-
-}
diff --git a/src/main/java/com/lcaohoanq/formhandling/modules/user/UserDAO.java b/src/main/java/com/lcaohoanq/formhandling/modules/user/UserDAO.java
deleted file mode 100644
index ec03ba5..0000000
--- a/src/main/java/com/lcaohoanq/formhandling/modules/user/UserDAO.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package com.lcaohoanq.formhandling.modules.user;
-
-import com.lcaohoanq.formhandling.constants.ErrorMessages;
-import com.lcaohoanq.formhandling.utils.PBKDF2;
-import jakarta.persistence.EntityManager;
-import jakarta.persistence.EntityManagerFactory;
-import jakarta.persistence.ParameterMode;
-import jakarta.persistence.Persistence;
-import jakarta.persistence.StoredProcedureQuery;
-import java.util.ArrayList;
-import java.util.List;
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.hibernate.query.Query;
-
-@Deprecated
-public class UserDAO {
-
- private static UserDAO instance;
- private final EntityManagerFactory emf = Persistence.createEntityManagerFactory("JFXSGPU");
-
- private UserDAO() {
- }
-
- public static UserDAO getInstance() {
- if (instance == null) {
- instance = new UserDAO();
- }
- return instance;
- }
-
- private EntityManager getEntityManager() {
- return emf.createEntityManager();
- }
-
- public List selectFirstNameAndScore() {
- List resultList = new ArrayList<>();
- EntityManager entityManager = getEntityManager();
- Session session = entityManager.unwrap(Session.class);
- Transaction transaction = null;
-
- try {
- transaction = session.beginTransaction();
- StoredProcedureQuery query = session.createStoredProcedureQuery(
- "proc_select_first_name_score");
- List