Compare commits
2 Commits
master
...
spring-boo
Author | SHA1 | Date | |
---|---|---|---|
f1b9e517d4 | |||
2ffbaebcfa |
27
pom.xml
27
pom.xml
@ -2,10 +2,11 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent -->
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.1</version>
|
||||
<version>2.7.18</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
@ -18,10 +19,6 @@
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -30,20 +27,17 @@
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations -->
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<version>2.2.25</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
<version>1.6.9</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
<version>1.8.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@ -56,4 +50,13 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>uPagge</id>
|
||||
<name>Struchkov Mark</name>
|
||||
<email>mark@struchkov.dev</email>
|
||||
<url>https://mark.struchkov.dev</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
</project>
|
||||
|
@ -10,7 +10,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
@ -36,8 +36,8 @@ public class PointController {
|
||||
@Operation(summary = "Управление баллами", description = "Позволяет удалить или добавить баллы пользователю")
|
||||
public HttpStatus changePoints(
|
||||
@PathVariable @NotBlank @Parameter(description = "Идентификатор пользователя") String key,
|
||||
@RequestParam("point") @Min(0) @Parameter(description = "Количество баллов", required = true) Long point,
|
||||
@RequestParam("type") @Parameter(description = "Тип операции", required = true) TypeOperation type
|
||||
@RequestPart("point") @Min(0) @Parameter(description = "Количество баллов", required = true) Long point,
|
||||
@RequestPart("type") @Parameter(description = "Тип операции", required = true) TypeOperation type
|
||||
) {
|
||||
final UserDto userDto = repository.get(key);
|
||||
userDto.setPoints(
|
||||
|
@ -2,7 +2,6 @@ package org.sadtech.example.swagger.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user