Skip to content

Commit

Permalink
Merge pull request #236 from NDLANO/spring-boot-again
Browse files Browse the repository at this point in the history
Spring boot again
  • Loading branch information
gunnarvelle authored Mar 4, 2024
2 parents 9355c0e + 7e1de54 commit 61374b3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY ./ src/
WORKDIR /src
RUN mvn clean package -DskipTests

FROM eclipse-temurin:20-alpine
FROM eclipse-temurin:21-alpine
RUN apk add fontconfig && apk add ttf-dejavu
EXPOSE 5000
COPY --from=0 /src/target/taxonomy-service.jar /app.jar
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.4</version>
<version>3.2.3</version>
<relativePath/>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<javamelody.version>2.0.1</javamelody.version>
<javamelody.version>2.1.0</javamelody.version>
<spotless.version>2.40.0</spotless.version>
</properties>

Expand Down Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -153,7 +153,7 @@
<dependency>
<groupId>net.lbruun.springboot</groupId>
<artifactId>preliquibase-spring-boot-starter</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>
</dependency>

<dependency>
Expand All @@ -170,7 +170,7 @@
<dependency>
<groupId>io.hypersistence</groupId>
<artifactId>hypersistence-utils-hibernate-62</artifactId>
<version>3.5.2</version>
<version>3.7.3</version>
</dependency>

<dependency>
Expand All @@ -181,7 +181,7 @@
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.16.1</version>
<version>1.17.2</version>
</dependency>

</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/no/ndla/taxonomy/config/SchedulingConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.task.TaskSchedulerCustomizer;
import org.springframework.boot.task.ThreadPoolTaskSchedulerCustomizer;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.DataAccessException;
import org.springframework.scheduling.annotation.EnableScheduling;
Expand All @@ -18,7 +18,7 @@

@Configuration
@EnableScheduling
public class SchedulingConfig implements TaskSchedulerCustomizer {
public class SchedulingConfig implements ThreadPoolTaskSchedulerCustomizer {
@Override
public void customize(ThreadPoolTaskScheduler taskScheduler) {
taskScheduler.setErrorHandler(new CustomErrorHandler());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public interface NodeRepository extends TaxonomyRepository<Node> {
LEFT JOIN n.parentConnections pc
WHERE ((:#{#nodeTypes == null} = true) OR n.nodeType in (:nodeTypes))
AND (:isVisible IS NULL OR n.visible = :isVisible)
AND (:metadataFilterKey IS NULL OR jsonb_extract_path_text(n.customfields, :metadataFilterKey) IS NOT NULL)
AND (:metadataFilterKey IS NULL OR jsonb_extract_path_text(n.customfields, cast(:metadataFilterKey as text)) IS NOT NULL)
AND (:metadataFilterValue IS NULL OR cast(jsonb_path_query_array(n.customfields, '$.*') as text) like :metadataFilterValue)
AND (:contentUri IS NULL OR n.contentUri = :contentUri)
AND (:contextId IS NULL OR jsonb_contains(n.contexts, jsonb_build_array(jsonb_build_object('contextId',:contextId))) = true)
AND (:contextId IS NULL OR cast(jsonb_contains(n.contexts, jsonb_build_array(jsonb_build_object('contextId',:contextId))) as boolean) = true)
AND (:isContext IS NULL OR n.context = :isContext)
AND (:isRoot IS NULL OR (pc IS NULL AND n.context = true))
""")
Expand Down Expand Up @@ -74,10 +74,10 @@ List<Integer> findIdsFiltered(
LEFT JOIN FETCH pc.relevance
WHERE ((:#{#nodeTypes == null} = true) OR n.nodeType in (:nodeTypes))
AND (:isVisible IS NULL OR n.visible = :isVisible)
AND (:metadataFilterKey IS NULL OR jsonb_extract_path_text(n.customfields, :metadataFilterKey) IS NOT NULL)
AND (:metadataFilterKey IS NULL OR jsonb_extract_path_text(n.customfields, cast(:metadataFilterKey as text)) IS NOT NULL)
AND (:metadataFilterValue IS NULL OR cast(jsonb_path_query_array(n.customfields, '$.*') as text) like :metadataFilterValue)
AND (:contentUri IS NULL OR n.contentUri = :contentUri)
AND (:contextId IS NULL OR jsonb_contains(n.contexts, jsonb_build_array(jsonb_build_object('contextId',:contextId))) = true)
AND (:contextId IS NULL OR cast(jsonb_contains(n.contexts, jsonb_build_array(jsonb_build_object('contextId',:contextId))) as boolean) = true)
AND (:isContext IS NULL OR n.context = true)
""")
List<Node> findByNodeType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Updates the Connection object with the correct schema, based on the tenant identifier
*/
@Component
public class VersionConnectionProvider extends AbstractDataSourceBasedMultiTenantConnectionProviderImpl {
public class VersionConnectionProvider extends AbstractDataSourceBasedMultiTenantConnectionProviderImpl<String> {
private final DataSource dataSource;

@Value("${spring.datasource.hikari.schema:taxonomy_api}")
Expand Down

0 comments on commit 61374b3

Please sign in to comment.