Skip to content

Commit ede79fc

Browse files
optimization imports
1 parent 3bdcfef commit ede79fc

8 files changed

Lines changed: 66 additions & 67 deletions

File tree

src/main/java/app/smartpot/api/Cache/RedisConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.springframework.cache.annotation.EnableCaching;
77
import org.springframework.context.annotation.Bean;
88
import org.springframework.context.annotation.Configuration;
9-
import org.springframework.data.redis.connection.RedisConnection;
109
import org.springframework.data.redis.connection.RedisConnectionFactory;
1110
import org.springframework.data.redis.connection.RedisPassword;
1211
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;

src/main/java/app/smartpot/api/Records/Controller/RecordController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package app.smartpot.api.records.controller;
22

3-
import org.springframework.beans.factory.annotation.Autowired;
4-
import org.springframework.http.HttpStatus;
5-
import org.springframework.http.ResponseEntity;
6-
import org.springframework.web.bind.annotation.*;
73
import app.smartpot.api.exception.ApiResponse;
84
import app.smartpot.api.records.model.dto.RecordDTO;
95
import app.smartpot.api.records.model.entity.DateRange;
106
import app.smartpot.api.records.model.entity.History;
117
import app.smartpot.api.records.service.RecordService;
128
import app.smartpot.api.responses.ErrorResponse;
9+
import org.springframework.beans.factory.annotation.Autowired;
10+
import org.springframework.http.HttpStatus;
11+
import org.springframework.http.ResponseEntity;
12+
import org.springframework.web.bind.annotation.*;
1313

1414
import java.util.List;
1515

src/main/java/app/smartpot/api/Records/Mapper/RecordMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package app.smartpot.api.records.mapper;
22

3+
import app.smartpot.api.records.model.dto.RecordDTO;
4+
import app.smartpot.api.records.model.entity.History;
35
import org.bson.types.ObjectId;
46
import org.mapstruct.Mapper;
57
import org.mapstruct.Mapping;
68
import org.mapstruct.factory.Mappers;
7-
import app.smartpot.api.records.model.dto.RecordDTO;
8-
import app.smartpot.api.records.model.entity.History;
99

1010
@Mapper(componentModel = "spring")
1111
public interface RecordMapper {

src/main/java/app/smartpot/api/Records/Model/DTO/CropRecordDTO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package app.smartpot.api.records.model.dto;
22

3-
import lombok.Data;
43
import app.smartpot.api.crops.model.dto.CropDTO;
54
import app.smartpot.api.records.model.entity.History;
65
import app.smartpot.api.records.model.entity.Measures;
6+
import lombok.Data;
77

88
@Data
99
public class CropRecordDTO {

src/main/java/app/smartpot/api/Records/Repository/RecordRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package app.smartpot.api.records.repository;
22

3+
import app.smartpot.api.records.model.entity.History;
34
import jakarta.validation.constraints.NotNull;
45
import jakarta.validation.constraints.PastOrPresent;
56
import org.bson.types.ObjectId;
67
import org.springframework.data.mongodb.repository.MongoRepository;
78
import org.springframework.data.mongodb.repository.Query;
89
import org.springframework.stereotype.Repository;
9-
import app.smartpot.api.records.model.entity.History;
1010

1111
import java.util.Date;
1212
import java.util.List;

src/main/java/app/smartpot/api/Records/Service/RecordService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package app.smartpot.api.records.service;
22

3-
import org.springframework.http.ResponseEntity;
43
import app.smartpot.api.exception.ApiResponse;
54
import app.smartpot.api.records.model.dto.CropRecordDTO;
65
import app.smartpot.api.records.model.dto.RecordDTO;
76
import app.smartpot.api.records.model.entity.DateRange;
87
import app.smartpot.api.records.model.entity.History;
8+
import org.springframework.http.ResponseEntity;
99

1010
import java.util.List;
1111

src/main/java/app/smartpot/api/Records/Service/RecordServiceImpl.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
package app.smartpot.api.records.service;
22

3-
import app.smartpot.api.records.mapper.RecordMapper;
4-
import lombok.Builder;
5-
import lombok.Data;
6-
import lombok.extern.slf4j.Slf4j;
7-
import org.bson.types.ObjectId;
8-
import org.springframework.beans.factory.annotation.Autowired;
9-
import org.springframework.http.HttpStatus;
10-
import org.springframework.http.ResponseEntity;
11-
import org.springframework.stereotype.Service;
123
import app.smartpot.api.crops.model.dto.CropDTO;
134
import app.smartpot.api.crops.service.CropService;
145
import app.smartpot.api.exception.ApiException;
156
import app.smartpot.api.exception.ApiResponse;
7+
import app.smartpot.api.records.mapper.RecordMapper;
168
import app.smartpot.api.records.model.dto.CropRecordDTO;
179
import app.smartpot.api.records.model.dto.MeasuresDTO;
1810
import app.smartpot.api.records.model.dto.RecordDTO;
1911
import app.smartpot.api.records.model.entity.DateRange;
2012
import app.smartpot.api.records.model.entity.History;
2113
import app.smartpot.api.records.repository.RecordRepository;
14+
import lombok.Builder;
15+
import lombok.Data;
16+
import lombok.extern.slf4j.Slf4j;
17+
import org.bson.types.ObjectId;
18+
import org.springframework.beans.factory.annotation.Autowired;
19+
import org.springframework.http.HttpStatus;
20+
import org.springframework.http.ResponseEntity;
21+
import org.springframework.stereotype.Service;
2222

2323
import java.util.ArrayList;
2424
import java.util.List;

src/test/resources/application.yml

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
application:
2-
author: SmartPot Developers
3-
description: Entorno de Prueba para API de SmartPot
4-
security:
5-
jwt:
6-
expiration: 4102444800
7-
secret-key: mySuperSecretKey
8-
public:
9-
routes: /**
10-
title: SmartPot-API-Test
11-
version: 1.0.0
2+
author: SmartPot Developers
3+
description: Entorno de Prueba para API de SmartPot
4+
security:
5+
jwt:
6+
expiration: 4102444800
7+
secret-key: mySuperSecretKey
8+
public:
9+
routes: /**
10+
title: SmartPot-API-Test
11+
version: 1.0.0
1212
http:
13-
header:
14-
cors:
15-
allowedOrigins: '*'
13+
header:
14+
cors:
15+
allowedOrigins: '*'
1616
logging:
17-
level:
18-
com:
19-
mongodb: DEBUG
20-
io:
21-
swagger: DEBUG
22-
org:
23-
springdoc: DEBUG
24-
springframework: DEBUG
25-
springframework.data.mongodb: DEBUG
26-
springframework.web.filter: DEBUG
27-
root: DEBUG
28-
smartpot:
29-
com:
30-
api:
31-
Security:
32-
jwt: DEBUG
17+
level:
18+
com:
19+
mongodb: DEBUG
20+
io:
21+
swagger: DEBUG
22+
org:
23+
springdoc: DEBUG
24+
springframework: DEBUG
25+
springframework.data.mongodb: DEBUG
26+
springframework.web.filter: DEBUG
27+
root: DEBUG
28+
smartpot:
29+
com:
30+
api:
31+
Security:
32+
jwt: DEBUG
3333
server:
34-
port: 8091
35-
tomcat:
36-
connection-timeout: 100000000
34+
port: 8091
35+
tomcat:
36+
connection-timeout: 100000000
3737
spring:
38-
application:
39-
name: SmartPot-API-Test
40-
data:
41-
mongodb:
42-
uri: mongo://localhost:27017/smartpot
38+
application:
39+
name: SmartPot-API-Test
40+
data:
41+
mongodb:
42+
uri: mongo://localhost:27017/smartpot
4343
springdoc:
44-
api-docs:
45-
enabled: true
46-
swagger-ui:
47-
default-model-expand-depth: 1
48-
default-model-rendering: example
49-
display-operation-id: false
50-
display-request-duration: true
51-
doc-expansion: list
52-
enabled: true
53-
path: /
54-
url: /v3/api-docs
44+
api-docs:
45+
enabled: true
46+
swagger-ui:
47+
default-model-expand-depth: 1
48+
default-model-rendering: example
49+
display-operation-id: false
50+
display-request-duration: true
51+
doc-expansion: list
52+
enabled: true
53+
path: /
54+
url: /v3/api-docs

0 commit comments

Comments
 (0)