Skip to content

Commit

Permalink
user image upload tests passed, test suite errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethL2020 committed Sep 26, 2024
1 parent 2c78a3e commit 6fa754a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 25 deletions.
51 changes: 28 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>3.1.1</version>
<version>3.1.2</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
Expand Down Expand Up @@ -138,16 +138,15 @@
<executions>
<execution>
<id>create-archive</id>
<phase>verify</phase> <!-- Package everything during the package phase -->
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<!-- Descriptor for what to include in the assembly -->
<descriptor>src/assembly/src-assembly.xml</descriptor>
</descriptors>
<finalName>realestate-backend-all-in-one</finalName> <!-- Name of the final archive -->
<finalName>realestate-backend-all-in-one</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
Expand All @@ -161,17 +160,17 @@
<version>3.0.0-M1</version>
<executions>
<execution>
<phase>install</phase> <!-- Install the archive during the install phase -->
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${project.build.directory}/realestate-backend-all-in-one.jar</file> <!-- Path to the archive -->
<file>${project.build.directory}/realestate-backend-all-in-one.jar</file>
<groupId>com.intela</groupId>
<artifactId>realestate-backend</artifactId>
<version>${project.version}</version>
<packaging>jar</packaging> <!-- Packaging format -->
<classifier>all-in-one</classifier> <!-- Classifier to differentiate the archive -->
<packaging>jar</packaging>
<classifier>all-in-one</classifier>
</configuration>
</execution>
</executions>
Expand All @@ -180,7 +179,17 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.2</version>
<configuration>
<mainClass>com.intela.realestatebackend.RealestateBackendApplication</mainClass>
<layout>JAR</layout>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
Expand All @@ -196,12 +205,6 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
</plugin>

<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
Expand Down Expand Up @@ -229,15 +232,17 @@
</plugin>

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<mainClass>com.intela.realestatebackend.RealestateBackendApplication</mainClass>
</manifest>
</archive>
</configuration>
</plugin>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

@Repository
public interface IDRepository extends JpaRepository<ID, Integer> {
List<IDImageResponse> findAllByProfileId(int propertyId);
List<ID> findAllByProfileId(int propertyId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.beans.BeanUtils;

@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class ProfileImageResponse extends ProfileImage {
private Integer userId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void withdrawApplication(Integer applicationId, HttpServletRequest servle
}

public List<IDImageResponse> getIdImagesByApplicationId(Integer applicationId, HttpServletRequest servletRequest) {
List<IDImageResponse> idImageResponses = idRepository.findAllByProfileId(applicationId);
List<ID> idImageResponses = idRepository.findAllByProfileId(applicationId);
return idImageResponses.stream()
.map(Util::convertFromIDImageToImageResponse) // Assuming ImageResponse has a constructor that takes a PropertyImage
.collect(Collectors.toList());
Expand Down

0 comments on commit 6fa754a

Please sign in to comment.