-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from readyvery/test
25일 오픈 �메인 배포(1)
- Loading branch information
Showing
83 changed files
with
1,941 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ jobs: | |
host: ${{ secrets.MAIN_HOST }} | ||
key: ${{ secrets.MAIN_SSH_KEY }} | ||
source: "build/libs/*.jar" | ||
target: "/home/ubuntu/docker/java/test/jar" | ||
target: "/home/ready/docker/readyvery/jar" | ||
- name: SSH and deploy | ||
uses: appleboy/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,5 @@ out/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
/src/main/resources/application.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/main/java/com/readyvery/readyverydemo/config/JwtConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.readyvery.readyverydemo.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import com.auth0.jwt.algorithms.Algorithm; | ||
|
||
import lombok.Getter; | ||
|
||
@Configuration | ||
@Getter | ||
public class JwtConfig { | ||
|
||
private final String secretKey; | ||
private final Long accessTokenExpirationPeriod; | ||
private final Long refreshTokenExpirationPeriod; | ||
private final String accessTokenName; | ||
private final String refreshTokenName; | ||
private final String userFrontendUrl; | ||
private final String guestFrontendUrl; | ||
private final String cookieDomain; | ||
private final Algorithm algorithm; | ||
|
||
public static final String ACCESS_TOKEN_SUBJECT = "AccessToken"; | ||
public static final String REFRESH_TOKEN_SUBJECT = "RefreshToken"; | ||
public static final String EMAIL_CLAIM = "email"; | ||
public static final String USER_NUMBER = "userNumber"; | ||
public static final String BEARER = "Bearer "; | ||
public static final String AUTHORIZATION = "Authorization"; | ||
|
||
public JwtConfig( | ||
@Value("${jwt.secretKey}") String secretKey, | ||
@Value("${jwt.access.expiration}") Long accessTokenExpirationPeriod, | ||
@Value("${jwt.refresh.expiration}") Long refreshTokenExpirationPeriod, | ||
@Value("${jwt.access.cookie}") String accessTokenName, | ||
@Value("${jwt.refresh.cookie}") String refreshTokenName, | ||
@Value("${jwt.redirect-uri-user}") String userFrontendUrl, | ||
@Value("${jwt.redirect-uri-guest}") String guestFrontendUrl, | ||
@Value("${jwt.cookie.domain}") String cookieDomain | ||
) { | ||
this.secretKey = secretKey; | ||
this.accessTokenExpirationPeriod = accessTokenExpirationPeriod; | ||
this.refreshTokenExpirationPeriod = refreshTokenExpirationPeriod; | ||
this.accessTokenName = accessTokenName; | ||
this.refreshTokenName = refreshTokenName; | ||
this.userFrontendUrl = userFrontendUrl; | ||
this.guestFrontendUrl = guestFrontendUrl; | ||
this.cookieDomain = cookieDomain; | ||
this.algorithm = initializeAlgorithm(secretKey); | ||
} | ||
|
||
private Algorithm initializeAlgorithm(String secretKey) { | ||
if (secretKey == null || secretKey.trim().isEmpty()) { | ||
throw new IllegalArgumentException("Secret key must not be null or empty"); | ||
} | ||
return Algorithm.HMAC512(secretKey); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/com/readyvery/readyverydemo/config/OauthConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.readyvery.readyverydemo.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import lombok.Getter; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@Configuration | ||
@Getter | ||
public class OauthConfig { | ||
|
||
@Value("${app.apple.url}") | ||
private String appleUrl; | ||
|
||
@Value("${app.apple.private-key}") | ||
private String privateKeyString; | ||
@Value("${app.apple.client-id}") | ||
private String appleClientId; | ||
|
||
@Value("${app.apple.team-id}") | ||
private String appleTeamId; | ||
|
||
@Value("${app.apple.key-id}") | ||
private String appleKeyId; | ||
public static final String KAKAO_NAME = "kakao"; | ||
public static final String APPLE_NAME = "apple"; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/com/readyvery/readyverydemo/config/RedisConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.readyvery.readyverydemo.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.data.redis.connection.RedisConnectionFactory; | ||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@Configuration | ||
public class RedisConfig { | ||
|
||
@Value("${spring.data.redis.host}") | ||
private String host; | ||
|
||
@Value("${spring.data.redis.port}") | ||
private int port; | ||
|
||
@Bean | ||
public RedisConnectionFactory redisConnectionFactory() { | ||
|
||
LettuceConnectionFactory lettuceConnectionFactory = new LettuceConnectionFactory(host, port); | ||
log.info("RedisConfig.redisConnectionFactory() called" + lettuceConnectionFactory); | ||
return lettuceConnectionFactory; | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/com/readyvery/readyverydemo/config/SolApiConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.readyvery.readyverydemo.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import net.nurigo.sdk.NurigoApp; | ||
import net.nurigo.sdk.message.service.DefaultMessageService; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
@Configuration | ||
public class SolApiConfig { | ||
public static final String SOLAPI_URL = "https://api.solapi.com"; | ||
|
||
@Value("${solapi.api_key}") | ||
private String apiKey; | ||
|
||
@Value("${solapi.secret_key}") | ||
private String apiSecret; | ||
|
||
@Value("${solapi.templete.cancel}") | ||
private String templeteCancel; | ||
|
||
@Value("${solapi.templete.pickup}") | ||
private String templetePickup; | ||
|
||
@Value("${solapi.templete.order}") | ||
private String templeteOrder; | ||
|
||
@Value("${solapi.kakao.pfid}") | ||
private String kakaoPfid; | ||
|
||
@Value("${solapi.phone_number}") | ||
private String phoneNumber; | ||
|
||
@Bean | ||
public DefaultMessageService defaultMessageService() { | ||
return NurigoApp.INSTANCE.initialize(apiKey, apiSecret, SOLAPI_URL); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/java/com/readyvery/readyverydemo/config/UserApiConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.readyvery.readyverydemo.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import lombok.Getter; | ||
|
||
@Configuration | ||
@Getter | ||
public class UserApiConfig { | ||
@Value("${jwt.refresh.cookie}") | ||
private String refreshCookie; | ||
@Value("${service.app.admin.key}") | ||
private String serviceAppAdminKey; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.