Skip to content

Commit

Permalink
Code cleanup (mosip#977)
Browse files Browse the repository at this point in the history
* fix build issue

* Fix local startup issue

* Code cleanup, added domain-url config, organised imports

---------

Co-authored-by: Loganathan Sekar <[email protected]>
Signed-off-by: Ritik Jain <[email protected]>
  • Loading branch information
2 people authored and Ritik Jain committed Oct 31, 2023
1 parent c5fb210 commit 4522224
Show file tree
Hide file tree
Showing 19 changed files with 111 additions and 298 deletions.
5 changes: 5 additions & 0 deletions resident/resident-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@
<version>5.3.3.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.bitbucket.b_c</groupId>
<artifactId>jose4j</artifactId>
<version>0.9.3</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.mosip.resident.constant;

import java.util.List;
import java.util.Objects;
import java.util.Optional;

import org.springframework.core.env.Environment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.mosip.resident.constant;

import java.util.List;
import java.util.Objects;
import java.util.Optional;

import org.springframework.core.env.Environment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
package io.mosip.resident.controller;

import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Map;
import java.util.Objects;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import io.mosip.kernel.core.logger.spi.Logger;
import io.mosip.kernel.core.util.DateUtils;
import io.mosip.resident.config.LoggerConfiguration;
Expand All @@ -13,22 +30,6 @@
import io.mosip.resident.util.Utility;
import io.mosip.resident.validator.RequestValidator;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Map;
import java.util.Objects;

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
package io.mosip.resident.controller;

import java.io.IOException;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import io.mosip.kernel.core.http.ResponseWrapper;
import io.mosip.kernel.core.logger.spi.Logger;
import io.mosip.resident.config.LoggerConfiguration;
Expand All @@ -15,15 +25,6 @@
import io.mosip.resident.util.EventEnum;
import io.mosip.resident.validator.RequestValidator;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.Map;

/**
* @author Kamesh Shekhar Prasad
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import java.util.Map;

import io.mosip.resident.constant.ResidentErrorCode;
import io.mosip.resident.exception.ApisResourceAccessException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpStatus;
Expand All @@ -19,10 +17,12 @@
import io.mosip.kernel.core.logger.spi.Logger;
import io.mosip.resident.config.LoggerConfiguration;
import io.mosip.resident.constant.ResidentConstants;
import io.mosip.resident.constant.ResidentErrorCode;
import io.mosip.resident.dto.MainRequestDTO;
import io.mosip.resident.dto.MainResponseDTO;
import io.mosip.resident.dto.OtpRequestDTOV2;
import io.mosip.resident.dto.OtpRequestDTOV3;
import io.mosip.resident.exception.ApisResourceAccessException;
import io.mosip.resident.exception.InvalidInputException;
import io.mosip.resident.exception.ResidentServiceException;
import io.mosip.resident.service.ProxyOtpService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.mosip.resident.dto;

import java.util.List;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
* @author Kamesh Shekhar Prasad
* Dynamic Field Consolidate Response Dto
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.mosip.resident.dto;

import java.time.LocalDateTime;
import java.util.Map;

import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.mosip.resident.exception;

import io.mosip.kernel.core.exception.BaseUncheckedException;
import io.mosip.resident.constant.ResidentErrorCode;

public class InvalidInputException extends BaseResidentUncheckedExceptionWithMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void replaceData(byte[] newData) {

/**
* The Class RepeatableServletInputStream - used in
* ResettableStreamHttpServletRequest
* RepeatableServletInputStream
*/
private class RepeatableServletInputStream extends ServletInputStream {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package io.mosip.resident.repository;

import io.mosip.resident.entity.ResidentTransactionEntity;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;
import io.mosip.resident.entity.ResidentTransactionEntity;

/**
* The Interface ResidentTransactionRepository.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

import org.springframework.stereotype.Service;

Expand Down
Loading

0 comments on commit 4522224

Please sign in to comment.