Исправления

This commit is contained in:
Struchkov Mark 2022-10-29 11:02:39 +03:00
parent 9ba51e0c64
commit 88e3361b43
11 changed files with 79 additions and 109 deletions

View File

@ -44,11 +44,11 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>dev.struchkov.filmorate</groupId> <groupId>dev.struchkov.filmorate</groupId>
<artifactId>filmorate-data-jpa</artifactId> <artifactId>filmorate-data-local</artifactId>
</dependency> </dependency>
<!-- <dependency>--> <!-- <dependency>-->
<!-- <groupId>dev.struchkov.filmorate</groupId>--> <!-- <groupId>dev.struchkov.filmorate</groupId>-->
<!-- <artifactId>filmorate-data-local</artifactId>--> <!-- <artifactId>filmorate-data-jpa</artifactId>-->
<!-- </dependency>--> <!-- </dependency>-->
<dependency> <dependency>
<groupId>dev.struchkov.filmorate</groupId> <groupId>dev.struchkov.filmorate</groupId>

View File

@ -14,7 +14,7 @@
<maven.compiler.target>17</maven.compiler.target> <maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<filmorate.version>0.0.1-SNAPSHOT</filmorate.version> <filmorate.version>${project.version}</filmorate.version>
<filmorate.domain.version>${filmorate.version}</filmorate.domain.version> <filmorate.domain.version>${filmorate.version}</filmorate.domain.version>
<filmorate.context.version>${filmorate.version}</filmorate.context.version> <filmorate.context.version>${filmorate.version}</filmorate.context.version>
<filmorate.core.version>${filmorate.version}</filmorate.core.version> <filmorate.core.version>${filmorate.version}</filmorate.core.version>

View File

@ -24,21 +24,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -33,21 +33,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -37,21 +37,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -23,21 +23,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -17,21 +17,4 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -43,21 +43,4 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -39,7 +39,9 @@ public class FilmController {
public ResponseEntity<FilmDto> create(@RequestBody FilmDto filmDto) { public ResponseEntity<FilmDto> create(@RequestBody FilmDto filmDto) {
return ResponseEntity.ok( return ResponseEntity.ok(
conversionService.convert( conversionService.convert(
filmService.create(conversionService.convert(filmDto, Film.class)), filmService.create(
conversionService.convert(filmDto, Film.class)
),
FilmDto.class FilmDto.class
) )
); );

View File

@ -18,4 +18,5 @@ public class FilmToDtoConvert implements Converter<Film, FilmDto> {
filmDto.setDescription(source.getDescription()); filmDto.setDescription(source.getDescription());
return filmDto; return filmDto;
} }
} }

75
pom.xml
View File

@ -24,6 +24,18 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<filmorate.version>${project.version}</filmorate.version>
<filmorate.domain.version>${filmorate.version}</filmorate.domain.version>
<filmorate.context.version>${filmorate.version}</filmorate.context.version>
<filmorate.core.version>${filmorate.version}</filmorate.core.version>
<filmorate.data.jpa.version>${filmorate.version}</filmorate.data.jpa.version>
<filmorate.data.local.version>${filmorate.version}</filmorate.data.local.version>
<filmorate.web.version>${filmorate.version}</filmorate.web.version>
<spring.starter.parent.version>2.7.5</spring.starter.parent.version>
<mapstruct.version>1.5.2.Final</mapstruct.version>
<plugin.maven.compiler.version>3.10.1</plugin.maven.compiler.version> <plugin.maven.compiler.version>3.10.1</plugin.maven.compiler.version>
<plugin.maven.source.version>3.2.1</plugin.maven.source.version> <plugin.maven.source.version>3.2.1</plugin.maven.source.version>
<plugin.maven.javadoc.version>3.4.1</plugin.maven.javadoc.version> <plugin.maven.javadoc.version>3.4.1</plugin.maven.javadoc.version>
@ -32,12 +44,54 @@
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>dev.struchkov.filmorate</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>filmorate-bom</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>${spring.starter.parent.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<dependency>
<groupId>dev.struchkov.filmorate</groupId>
<artifactId>filmorate-domain</artifactId>
<version>${filmorate.domain.version}</version>
</dependency>
<dependency>
<groupId>dev.struchkov.filmorate</groupId>
<artifactId>filmorate-context</artifactId>
<version>${filmorate.context.version}</version>
</dependency>
<dependency>
<groupId>dev.struchkov.filmorate</groupId>
<artifactId>filmorate-core</artifactId>
<version>${filmorate.core.version}</version>
</dependency>
<dependency>
<groupId>dev.struchkov.filmorate</groupId>
<artifactId>filmorate-data-local</artifactId>
<version>${filmorate.data.local.version}</version>
</dependency>
<dependency>
<groupId>dev.struchkov.filmorate</groupId>
<artifactId>filmorate-data-jpa</artifactId>
<version>${filmorate.data.jpa.version}</version>
</dependency>
<dependency>
<groupId>dev.struchkov.filmorate</groupId>
<artifactId>filmorate-web</artifactId>
<version>${filmorate.web.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
@ -113,6 +167,21 @@
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build> </build>
<developers> <developers>