-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Upgrade to Spring Boot 3.3.4 - Remove the JPA variant that is not competitive and introduces additional processing not needed in other variants - Use batched update in the JDBC variant (compliant with the test requirements) - Set Hikari maximum pool size to 256 - Switch to jstachio for view rendering
- Loading branch information
Showing
22 changed files
with
149 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
frameworks/Java/spring/src/main/java/hello/UpdateWorldService.java
This file was deleted.
Oops, something went wrong.
43 changes: 0 additions & 43 deletions
43
frameworks/Java/spring/src/main/java/hello/UpdateWorldServiceImpl.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package hello; | ||
|
||
import java.util.concurrent.ThreadLocalRandom; | ||
import java.util.stream.IntStream; | ||
|
||
abstract public class Utils { | ||
|
||
private static final int MIN_WORLD_NUMBER = 1; | ||
private static final int MAX_WORLD_NUMBER_PLUS_ONE = 10_001; | ||
|
||
public static int randomWorldNumber() { | ||
return ThreadLocalRandom.current().nextInt(MIN_WORLD_NUMBER, MAX_WORLD_NUMBER_PLUS_ONE); | ||
} | ||
|
||
public static IntStream randomWorldNumbers() { | ||
return ThreadLocalRandom.current().ints(MIN_WORLD_NUMBER, MAX_WORLD_NUMBER_PLUS_ONE).distinct(); | ||
} | ||
|
||
} |
12 changes: 0 additions & 12 deletions
12
frameworks/Java/spring/src/main/java/hello/jpa/FortuneRepository.java
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
frameworks/Java/spring/src/main/java/hello/jpa/JpaDbRepository.java
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
frameworks/Java/spring/src/main/java/hello/jpa/WorldRepository.java
This file was deleted.
Oops, something went wrong.
26 changes: 9 additions & 17 deletions
26
frameworks/Java/spring/src/main/java/hello/model/Fortune.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,25 @@ | ||
package hello.model; | ||
|
||
import jakarta.persistence.Entity; | ||
|
||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.mongodb.core.mapping.Document; | ||
import org.springframework.data.mongodb.core.mapping.Field; | ||
|
||
@Document | ||
@Entity | ||
public final class Fortune { | ||
public final class Fortune implements Comparable<Fortune>{ | ||
|
||
@Id | ||
@jakarta.persistence.Id | ||
public int id; | ||
@Field("message") | ||
public String message; | ||
public final int id; | ||
|
||
protected Fortune() { | ||
} | ||
@Field("message") | ||
public final String message; | ||
|
||
public Fortune(int id, String message) { | ||
this.id = id; | ||
this.message = message; | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
|
||
public String getMessage() { | ||
return message; | ||
@Override | ||
public int compareTo(final Fortune other) { | ||
return message.compareTo(other.message); | ||
} | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
frameworks/Java/spring/src/main/java/hello/model/Message.java
This file was deleted.
Oops, something went wrong.
14 changes: 5 additions & 9 deletions
14
frameworks/Java/spring/src/main/java/hello/model/World.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
package hello.model; | ||
|
||
import jakarta.persistence.Entity; | ||
|
||
import org.springframework.data.annotation.Id; | ||
import org.springframework.data.mongodb.core.mapping.Document; | ||
import org.springframework.data.mongodb.core.mapping.Field; | ||
|
||
@Document | ||
@Entity | ||
public final class World { | ||
|
||
@Id | ||
@jakarta.persistence.Id | ||
public int id; | ||
|
||
@Field("randomNumber") | ||
public int randomnumber; | ||
public int randomNumber; | ||
|
||
protected World() { | ||
} | ||
|
||
public World(int id, int randomnumber) { | ||
public World(int id, int randomNumber) { | ||
this.id = id; | ||
this.randomnumber = randomnumber; | ||
this.randomNumber = randomNumber; | ||
} | ||
|
||
} |
Oops, something went wrong.