Skip to content

Commit 0dfc64a

Browse files
committed
update deps
Signed-off-by: Kirill Mokevnin <[email protected]>
1 parent 75e6a2b commit 0dfc64a

File tree

10 files changed

+124
-127
lines changed

10 files changed

+124
-127
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
setup:
2-
./gradlew wrapper --gradle-version 8.5
2+
./gradlew wrapper --gradle-version 8.12.1
33
./gradlew build
44

55
app:

build.gradle.kts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
33

44
plugins {
55
application
6-
id("io.freefair.lombok") version "8.4"
7-
id("org.springframework.boot") version "3.2.0"
8-
id("io.spring.dependency-management") version "1.1.4"
9-
id("com.github.ben-manes.versions") version "0.50.0"
6+
id("io.freefair.lombok") version "8.12.1"
7+
id("org.springframework.boot") version "3.4.2"
8+
id("io.spring.dependency-management") version "1.1.7"
9+
id("com.github.ben-manes.versions") version "0.52.0"
1010
}
1111

1212
group = "io.hexlet.blog"
@@ -27,18 +27,18 @@ dependencies {
2727
implementation("org.springframework.boot:spring-boot-starter-actuator")
2828
implementation("org.springframework.boot:spring-boot-configuration-processor")
2929
implementation("org.springframework.boot:spring-boot-starter-security")
30-
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")
30+
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.4")
3131
// implementation("io.sentry:sentry-spring-boot-starter-jakarta:6.28.0")
3232

3333
implementation("org.openapitools:jackson-databind-nullable:0.2.6")
34-
implementation("org.mapstruct:mapstruct:1.6.0.Beta1")
35-
annotationProcessor("org.mapstruct:mapstruct-processor:1.6.0.Beta1")
34+
implementation("org.mapstruct:mapstruct:1.6.3")
35+
annotationProcessor("org.mapstruct:mapstruct-processor:1.6.3")
3636

3737
runtimeOnly("com.h2database:h2:2.2.224")
38-
implementation("org.apache.commons:commons-lang3:3.14.0")
39-
implementation("net.datafaker:datafaker:2.0.2")
40-
implementation("org.instancio:instancio-junit:3.6.0")
41-
implementation("net.javacrumbs.json-unit:json-unit-assertj:3.2.2")
38+
implementation("org.apache.commons:commons-lang3:3.17.0")
39+
implementation("net.datafaker:datafaker:2.4.2")
40+
implementation("org.instancio:instancio-junit:5.3.0")
41+
implementation("net.javacrumbs.json-unit:json-unit-assertj:4.1.0")
4242
testImplementation("org.springframework.boot:spring-boot-starter-test")
4343
testImplementation(platform("org.junit:junit-bom:5.10.1"))
4444
testImplementation("org.junit.jupiter:junit-jupiter:5.10.1")

gradle/wrapper/gradle-wrapper.jar

-19.7 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
8890

8991
# Use the maximum available, or set MAX_FD != -1 to use that value.
9092
MAX_FD=maximum

gradlew.bat

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
4345
%JAVA_EXE% -version >NUL 2>&1
4446
if %ERRORLEVEL% equ 0 goto execute
4547

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5153

5254
goto fail
5355

@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5759

5860
if exist "%JAVA_EXE%" goto execute
5961

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6567

6668
goto fail
6769

src/main/java/io/hexlet/blog/mapper/JsonNullableMapper.java

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,24 @@
55
import org.mapstruct.MappingConstants;
66
import org.openapitools.jackson.nullable.JsonNullable;
77

8-
@Mapper(
9-
componentModel = MappingConstants.ComponentModel.SPRING
10-
)
8+
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
119
public abstract class JsonNullableMapper {
1210

13-
public <T> JsonNullable<T> wrap(T entity) {
14-
return JsonNullable.of(entity);
15-
}
11+
public <T> JsonNullable<T> wrap(T entity) {
12+
return JsonNullable.of(entity);
13+
}
1614

17-
public <T> T unwrap(JsonNullable<T> jsonNullable) {
18-
return jsonNullable == null ? null : jsonNullable.orElse(null);
19-
}
15+
public <T> T unwrap(JsonNullable<T> jsonNullable) {
16+
return jsonNullable == null ? null : jsonNullable.orElse(null);
17+
}
2018

21-
/**
22-
* Checks whether nullable parameter was passed explicitly.
23-
*
24-
* @return true if value was set explicitly, false otherwise
25-
*/
26-
@Condition
27-
public <T> boolean isPresent(JsonNullable<T> nullable) {
28-
return nullable != null && nullable.isPresent();
29-
}
19+
/**
20+
* Checks whether nullable parameter was passed explicitly.
21+
*
22+
* @return true if value was set explicitly, false otherwise
23+
*/
24+
@Condition
25+
public <T> boolean isPresent(JsonNullable<T> nullable) {
26+
return nullable != null && nullable.isPresent();
27+
}
3028
}

src/main/java/io/hexlet/blog/mapper/ReferenceMapper.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
import io.hexlet.blog.model.BaseEntity;
99
import jakarta.persistence.EntityManager;
1010

11-
@Mapper(
12-
componentModel = MappingConstants.ComponentModel.SPRING
13-
)
11+
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
1412
public abstract class ReferenceMapper {
15-
@Autowired
16-
private EntityManager entityManager;
13+
@Autowired
14+
private EntityManager entityManager;
1715

18-
public <T extends BaseEntity> T toEntity(Long id, @TargetType Class<T> entityClass) {
19-
return id != null ? entityManager.find(entityClass, id) : null;
20-
}
16+
public <T extends BaseEntity> T toEntity(Long id, @TargetType Class<T> entityClass) {
17+
return id != null ? entityManager.find(entityClass, id) : null;
18+
}
2119
}

src/main/java/io/hexlet/blog/mapper/UserMapper.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@
1111
import io.hexlet.blog.dto.UserDTO;
1212
import io.hexlet.blog.model.User;
1313

14-
@Mapper(
15-
uses = { JsonNullableMapper.class, ReferenceMapper.class },
16-
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
17-
componentModel = MappingConstants.ComponentModel.SPRING,
18-
unmappedTargetPolicy = ReportingPolicy.IGNORE
19-
)
14+
@Mapper(uses = { JsonNullableMapper.class,
15+
ReferenceMapper.class }, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, componentModel = MappingConstants.ComponentModel.SPRING, unmappedTargetPolicy = ReportingPolicy.IGNORE)
2016
public abstract class UserMapper {
21-
public abstract User map(UserDTO model);
22-
public abstract UserDTO map(User model);
17+
public abstract User map(UserDTO model);
2318

24-
public abstract void update(UserDTO update, @MappingTarget User destination);
19+
public abstract UserDTO map(User model);
20+
21+
public abstract void update(UserDTO update, @MappingTarget User destination);
2522
}

src/main/java/io/hexlet/blog/model/User.java

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -30,71 +30,71 @@
3030
@Table(name = "users")
3131
public class User implements UserDetails, BaseEntity {
3232

33-
@Id
34-
@GeneratedValue(strategy = IDENTITY)
35-
@ToString.Include
36-
@EqualsAndHashCode.Include
37-
private Long id;
38-
39-
// EMAIL
40-
@Column(unique = true)
41-
@ToString.Include
42-
private String email;
43-
44-
// @NotBlank
45-
@ToString.Include
46-
private String firstName;
47-
48-
// @NotBlank
49-
@ToString.Include
50-
private String lastName;
51-
52-
@NotBlank
53-
private String passwordDigest;
54-
55-
@LastModifiedDate
56-
private Date updatedAt;
57-
58-
@CreatedDate
59-
private Date createdAt;
60-
61-
// @Override
62-
// public String getPassword() {
63-
// return password;
64-
// }
65-
66-
@Override
67-
public String getUsername() {
68-
return email;
69-
}
70-
71-
@Override
72-
public String getPassword() {
73-
return passwordDigest;
74-
}
75-
76-
@Override
77-
public boolean isEnabled() {
78-
return true;
79-
}
80-
81-
@Override
82-
public Collection<? extends GrantedAuthority> getAuthorities() {
83-
return new ArrayList<GrantedAuthority>();
84-
}
85-
86-
@Override
87-
public boolean isAccountNonExpired() {
88-
return true;
89-
}
90-
91-
@Override
92-
public boolean isAccountNonLocked() {
93-
return true;
94-
}
95-
96-
@Override
97-
public boolean isCredentialsNonExpired() {
98-
return true;
99-
}
33+
@Id
34+
@GeneratedValue(strategy = IDENTITY)
35+
@ToString.Include
36+
@EqualsAndHashCode.Include
37+
private Long id;
38+
39+
// EMAIL
40+
@Column(unique = true)
41+
@ToString.Include
42+
private String email;
43+
44+
// @NotBlank
45+
@ToString.Include
46+
private String firstName;
47+
48+
// @NotBlank
49+
@ToString.Include
50+
private String lastName;
51+
52+
@NotBlank
53+
private String passwordDigest;
54+
55+
@LastModifiedDate
56+
private Date updatedAt;
57+
58+
@CreatedDate
59+
private Date createdAt;
60+
61+
// @Override
62+
// public String getPassword() {
63+
// return password;
64+
// }
65+
66+
@Override
67+
public String getUsername() {
68+
return email;
69+
}
70+
71+
@Override
72+
public String getPassword() {
73+
return passwordDigest;
74+
}
75+
76+
@Override
77+
public boolean isEnabled() {
78+
return true;
79+
}
80+
81+
@Override
82+
public Collection<? extends GrantedAuthority> getAuthorities() {
83+
return new ArrayList<GrantedAuthority>();
84+
}
85+
86+
@Override
87+
public boolean isAccountNonExpired() {
88+
return true;
89+
}
90+
91+
@Override
92+
public boolean isAccountNonLocked() {
93+
return true;
94+
}
95+
96+
@Override
97+
public boolean isCredentialsNonExpired() {
98+
return true;
99+
}
100100
}

0 commit comments

Comments
 (0)