Skip to content

update deps #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.6.1 AS frontend
FROM node:23 AS frontend

WORKDIR /frontend

Expand All @@ -25,12 +25,13 @@ RUN ./gradlew --no-daemon dependencies

COPY lombok.config .
COPY src src
COPY config config

COPY --from=frontend /frontend/dist /backend/src/main/resources/static

RUN ./gradlew --no-daemon build

ENV JAVA_OPTS "-Xmx512M -Xms512M"
ENV JAVA_OPTS="-Xmx512M -Xms512M"
EXPOSE 8080

CMD java -jar build/libs/HexletSpringBlog-1.0-SNAPSHOT.jar
CMD ["java", "-jar", "build/libs/HexletSpringBlog-1.0-SNAPSHOT.jar"]
27 changes: 14 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
application
// "checkstyle"
id("io.freefair.lombok") version "8.6"
id("org.springframework.boot") version "3.2.4"
checkstyle
id("io.freefair.lombok") version "8.13.1"
id("org.springframework.boot") version "3.4.4"
id("io.spring.dependency-management") version "1.1.4"
id("com.github.ben-manes.versions") version "0.50.0"
id("com.github.ben-manes.versions") version "0.52.0"
}

group = "io.hexlet.blog"
Expand All @@ -27,23 +27,24 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")

implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.6")

implementation("org.openapitools:jackson-databind-nullable:0.2.6")
implementation("org.mapstruct:mapstruct:1.6.0.Beta1")
annotationProcessor("org.mapstruct:mapstruct-processor:1.6.0.Beta1")
implementation("org.mapstruct:mapstruct:1.6.3")
annotationProcessor("org.mapstruct:mapstruct-processor:1.6.3")

// implementation("io.github.wimdeblauwe:error-handling-spring-boot-starter:4.2.0")

implementation("org.instancio:instancio-junit:3.6.0")
implementation("net.javacrumbs.json-unit:json-unit-assertj:3.2.2")
implementation("net.datafaker:datafaker:2.0.2")
implementation("org.instancio:instancio-junit:5.4.1")
implementation("net.javacrumbs.json-unit:json-unit-assertj:4.1.0")
implementation("net.datafaker:datafaker:2.4.3")

runtimeOnly("com.h2database:h2:2.2.224")
runtimeOnly("com.h2database:h2:2.3.232")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation(platform("org.junit:junit-bom:5.10.1"))
testImplementation("org.junit.jupiter:junit-jupiter:5.10.1")
testImplementation(platform("org.junit:junit-bom:5.12.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package io.hexlet.blog.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import io.hexlet.blog.model.Post;
import io.hexlet.blog.model.PostComment;

@Repository
public interface PostCommentRepository extends JpaRepository<PostComment, Long>, JpaSpecificationExecutor<PostComment> {
// Page<Post> findAll(Specification<Post> spec, Pageable pageable);
}
public interface PostCommentRepository
extends JpaRepository<PostComment, Long>, JpaSpecificationExecutor<PostComment> { }

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ public void testIndex() throws Exception {
.andReturn();
var body = result.getResponse().getContentAsString();

Map<String, Object> content = om.readValue(body, new TypeReference<>() {});
Map<String, Object> content = om.readValue(body, new TypeReference<>() { });
var postComments = content.get("content");

List<PostCommentDTO> postCommentDTOS = om.convertValue(postComments, new TypeReference<>() {});
List<PostCommentDTO> postCommentDTOS = om.convertValue(postComments, new TypeReference<>() { });

var actual = postCommentDTOS.stream().map(postCommentMapper::map).toList();
var expected = postCommentRepository.findAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void testIndex() throws Exception {
.getResponse();
var body = response.getContentAsString();

List<PostDTO> postDTOS = om.readValue(body, new TypeReference<>() {});
List<PostDTO> postDTOS = om.readValue(body, new TypeReference<>() { });

var actual = postDTOS.stream().map(postMapper::map).toList();
var expected = postRepository.findAll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void testIndex() throws Exception {
.getResponse();
var body = response.getContentAsString();

List<UserDTO> userDTOS = om.readValue(body, new TypeReference<>() {});
List<UserDTO> userDTOS = om.readValue(body, new TypeReference<>() { });

var actual = userDTOS.stream().map(userMapper::map).toList();
var expected = userRepository.findAll();
Expand Down