Skip to content

Commit

Permalink
Update to spring 3.4 and refactor according to current suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
cl-a-us committed Dec 11, 2024
1 parent 1332b7f commit a00a706
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.5</version>
<version>3.4.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
// especially for rendering k8s_env.html
hints.reflection().registerType(Map.Entry.class, MemberCategory.values());
// hints.reflection().registerType(HashMap.class, MemberCategory.values());
// Innere Klassen
// inner classes
hints.reflection().registerTypeIfPresent(classLoader, "java.util.HashMap$Node"
, MemberCategory.values());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitialization;
import org.springframework.stereotype.Component;

import java.sql.Timestamp;
import java.util.Optional;

@Component
@DependsOnDatabaseInitialization
public class CounterService {

private static final Logger log = LoggerFactory.getLogger(CounterService.class);
Expand Down Expand Up @@ -56,7 +55,7 @@ private void initCounter() {

Optional<CounterEntity> counter = counterRepository.findById(ID);

if(!counter.isPresent()) {
if(counter.isEmpty()) {
CounterEntity newEntity = new CounterEntity();
newEntity.setId(ID);
newEntity.setCounter(0L);
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ logging.level.de.viadee=debug

spring.jpa.hibernate.ddl-auto=update

server.tomcat.max-threads=2
server.tomcat.threads.max=2

management.endpoints.enabled-by-default=true
management.endpoints.access.default=read-only
management.endpoints.web.exposure.include=*
management.health.db.enabled=true
management.endpoint.health.show-details=always
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class TestappApplicationTests {
class TestappApplicationTests {

@Test
public void contextLoads() {
@Test
void contextLoads() {
}

}

0 comments on commit a00a706

Please sign in to comment.