From bc9fc71bf5ca7d28f3481b3df4f26367bf1f1a73 Mon Sep 17 00:00:00 2001 From: Dzmitry Shalukhau Date: Wed, 23 Feb 2022 20:01:06 +0300 Subject: [PATCH] Add questions to start tall. --- QUESTIONS.md | 4 ++++ src/main/java/com/atanava/locator/AuthUser.java | 1 + src/main/java/com/atanava/locator/config/CacheConfig.java | 3 +++ src/main/java/com/atanava/locator/model/Role.java | 2 +- src/main/java/com/atanava/locator/service/PointTo.java | 1 + src/main/java/com/atanava/locator/web/OsmController.java | 1 + 6 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 QUESTIONS.md diff --git a/QUESTIONS.md b/QUESTIONS.md new file mode 100644 index 0000000..8a32303 --- /dev/null +++ b/QUESTIONS.md @@ -0,0 +1,4 @@ +* Why are you building custom cache instead of using some in-memory db (Redis, Memcached, etc) +* Ideally docker in development builds application inside container. This way allows to not install any development tools when you develop. Can you describe steps, how to implement it. +* Why you are using spring.jpa.open-in-view=false in configuration? Why developers forced to set it? Why it is antipattern? (Same questions for defer-datasource-initialization: true) +* Tests... What tests MUST be written (at least) \ No newline at end of file diff --git a/src/main/java/com/atanava/locator/AuthUser.java b/src/main/java/com/atanava/locator/AuthUser.java index 81d2daf..8a0140c 100644 --- a/src/main/java/com/atanava/locator/AuthUser.java +++ b/src/main/java/com/atanava/locator/AuthUser.java @@ -1,3 +1,4 @@ +/** @QUESTION: Why are you using this package? */ package com.atanava.locator; import com.atanava.locator.model.User; diff --git a/src/main/java/com/atanava/locator/config/CacheConfig.java b/src/main/java/com/atanava/locator/config/CacheConfig.java index 7746263..bb93f0b 100644 --- a/src/main/java/com/atanava/locator/config/CacheConfig.java +++ b/src/main/java/com/atanava/locator/config/CacheConfig.java @@ -20,6 +20,9 @@ @Slf4j @RequiredArgsConstructor +/** + * @QUESTION: Why you don't proxy beans? + */ @Configuration(proxyBeanMethods = false) public class CacheConfig { diff --git a/src/main/java/com/atanava/locator/model/Role.java b/src/main/java/com/atanava/locator/model/Role.java index 9733b4d..0dc9484 100644 --- a/src/main/java/com/atanava/locator/model/Role.java +++ b/src/main/java/com/atanava/locator/model/Role.java @@ -1,7 +1,7 @@ package com.atanava.locator.model; import org.springframework.security.core.GrantedAuthority; - +/** @QUESTION: Why did you not set ROLE_* using constructor */ public enum Role implements GrantedAuthority { USER, ADMIN; diff --git a/src/main/java/com/atanava/locator/service/PointTo.java b/src/main/java/com/atanava/locator/service/PointTo.java index 2616271..5cf3e3f 100644 --- a/src/main/java/com/atanava/locator/service/PointTo.java +++ b/src/main/java/com/atanava/locator/service/PointTo.java @@ -1,3 +1,4 @@ +/** @QUESTION: Why it is here? */ package com.atanava.locator.service; import com.atanava.locator.model.PointId; diff --git a/src/main/java/com/atanava/locator/web/OsmController.java b/src/main/java/com/atanava/locator/web/OsmController.java index 39616a0..568e9ee 100644 --- a/src/main/java/com/atanava/locator/web/OsmController.java +++ b/src/main/java/com/atanava/locator/web/OsmController.java @@ -37,6 +37,7 @@ public ResponseEntity getByAddress(@RequestParam(required = false) St @RequestParam(required = false) Integer addressdetails, @RequestParam(required = false) String format) { + /** @QUESTION: May be content negatiation will be better??? */ format = getFormatOrDefault(format); ArrayNode created; if (q != null) {