Skip to content

Commit

Permalink
Migrate to Spring Boot 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGuancheDarias committed Feb 10, 2024
1 parent bbee9c8 commit e8d0c6a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 7 deletions.
14 changes: 11 additions & 3 deletions business/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.13</version>
<version>3.2.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.kevinguanchedarias.owge</groupId>
Expand Down Expand Up @@ -212,6 +212,14 @@
<groupId>org.hibernate.jakarta.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
</exclusion>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -267,6 +275,7 @@
<artifactId>mockito-inline</artifactId>
<groupId>org.mockito</groupId>
<scope>test</scope>
<version>5.2.0</version>
</dependency>
</dependencies>
<build>
Expand All @@ -277,8 +286,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
<release>21</release>
</configuration>
</plugin>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.kevinguanchedarias.owgejava.entity.dialect;

import org.hibernate.boot.model.FunctionContributions;
import org.hibernate.boot.model.FunctionContributor;
import org.hibernate.dialect.function.StandardSQLFunction;
import org.hibernate.type.StandardBasicTypes;

public class OwgeMysqlFunctionContributor implements FunctionContributor {

@Override
public void contributeFunctions(FunctionContributions functionContributions) {
functionContributions.getFunctionRegistry()
.register("TIME_TO_SEC", new StandardSQLFunction("TIME_TO_SEC", StandardBasicTypes.DOUBLE));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface MissionReportRepository extends JpaRepository<MissionReport, Lo
* @author Kevin Guanche Darias <[email protected]>
* @since 0.9.0
*/
@Query("UPDATE MissionReport rp SET rp.userReadDate = CURRENT_DATE WHERE rp.user.id = :userId AND rp.id IN :reportsIds")
@Query("UPDATE MissionReport rp SET rp.userReadDate = CURRENT_TIMESTAMP WHERE rp.user.id = :userId AND rp.id IN :reportsIds")
@Modifying
void markAsReadIfUserIsOwner(List<Long> reportsIds, Integer userId);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.kevinguanchedarias.owgejava.entity.dialect.OwgeMysqlFunctionContributor
5 changes: 2 additions & 3 deletions game-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.13</version>
<version>3.2.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.kevinguanchedarias.owgejava</groupId>
Expand Down Expand Up @@ -107,8 +107,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
<release>21</release>
</configuration>
</plugin>
<plugin>
Expand Down
1 change: 1 addition & 0 deletions game-rest/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ spring.jpa.open-in-view=false
# spring.jpa.show-sql=true
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
spring.session.store-type=none
spring.threads.virtual.enabled=true
spring.main.allow-bean-definition-overriding=true
server.servlet.session.tracking-modes=
logging.level.com.kevinguanchedarias.owgejava=${OWGE_KGD_DEBUG_LEVEL:INFO}
Expand Down

0 comments on commit e8d0c6a

Please sign in to comment.