Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update for final report #20

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions docker-test-server/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
events {
worker_connections 1024;
}

http {
upstream spring-app {
server server1:8080; # 컨테이너 내부 포트 사용
server server2:8080;
server server3:8080;
}

server {
listen 8080;

location / {
proxy_pass http://spring-app;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_buffers 4 256k;
proxy_buffer_size 128k;
proxy_busy_buffers_size 256k;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ToothController {
private final JwtTokenService jwtTokenService;
private final InvalidTokenService invalidTokenService;
private final ToothService toothService;
private final Double totalCnt = 500.0;
private final Double totalCnt = 8.0;

@PostMapping("")
public ResponseEntity<?> mypageGetinfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.interfaces.DecodedJWT;

import io.github.cdimascio.dotenv.Dotenv;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class JwtTokenService {
Dotenv dotenv = Dotenv.configure().load();

private String secret = dotenv.get("JWT_SECRET_KEY");

private String secret = System.getenv("JWT_SECRET_KEY");

private int accessTokenExpMinutes = 600 * 1000; // 10분
private int accessTokenExpMinutes = 1728000 * 1000; // 10분

private int refreshTokenExpMinutes = 1209600 * 1000; // 2주
private int refreshTokenExpMinutes = 12096000 * 1000; // 2주

private final Algorithm algorithm = Algorithm.HMAC256(secret);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class ToothService {
private void init() {
toothPartEngToKor.put("UNDER_FRONT", "아랫쪽 앞니");
toothPartEngToKor.put("UP_FRONT", "윗쪽 앞니");
toothPartEngToKor.put("UNDER_RIGHT_CANINE", "아래쪽 오른쪽 송곳니");
toothPartEngToKor.put("UP_RIGHT_CANINE", "위쪽 오른쪽 송곳니");
toothPartEngToKor.put("UNDER_RIGHT_CANINE", "아랫쪽 오른쪽 송곳니");
toothPartEngToKor.put("UP_RIGHT_CANINE", "윗쪽 오른쪽 송곳니");
toothPartEngToKor.put("UNDER_RIGHT_MOLAR_OUTSIDE", "아랫쪽 오른쪽 어금니 바깥쪽");
toothPartEngToKor.put("UP_RIGHT_MOLAR_OUTSIDE", "윗쪽 오른쪽 어금니 바깥쪽");
toothPartEngToKor.put("UP_LEFT_MOLAR_CHEWING_SIDE", "윗쪽 왼쪽 어금니 씹는쪽");
Expand All @@ -45,7 +45,7 @@ public String toothPartEngToKorFunction(String englishPart) {
public String evaluationPercentValue(Double percent) {
if (100 == percent)
return "적절해요.";
else if (70 <= percent)
else if (60 <= percent)
return "주의해요.";
return "미흡해요.";
}
Expand Down
Loading