Skip to content

Commit fd7e6c8

Browse files
first commit
0 parents  commit fd7e6c8

File tree

221 files changed

+15669
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+15669
-0
lines changed

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM maven:3.6.3-jdk-8-slim AS build
2+
3+
ARG PROJECT_ROOT_IN_CONTAINER
4+
5+
# In the ./src/main/resources folder, 1) application.properties, 2) logback-spring.xml and 3) [the filename of 'server.ssl.key-store' in your properties] should be located.
6+
COPY ./ $PROJECT_ROOT_IN_CONTAINER
7+
USER root
8+
WORKDIR $PROJECT_ROOT_IN_CONTAINER
9+
10+
RUN --mount=type=cache,target=/root/.m2 mvn -f $PROJECT_ROOT_IN_CONTAINER/pom.xml clean install
11+
12+
FROM openjdk:17-alpine
13+
14+
ARG PROJECT_ROOT_IN_CONTAINER
15+
ARG FILE_STORAGE_ROOT_IN_CONTAINER
16+
ARG JVM_XMS
17+
ARG JVM_XMX
18+
19+
COPY --from=build $PROJECT_ROOT_IN_CONTAINER/ $PROJECT_ROOT_IN_CONTAINER
20+
21+
USER root
22+
WORKDIR $PROJECT_ROOT_IN_CONTAINER
23+
24+
RUN cp $PROJECT_ROOT_IN_CONTAINER/target/*.jar /app.jar
25+
26+
RUN ln -s $PROJECT_ROOT_IN_CONTAINER/.docker/entrypoint/run-app.sh /run-app.sh
27+
28+
RUN apk --no-cache add curl bash fontconfig ttf-dejavu
29+
30+
ENV PROJECT_ROOT_IN_CONTAINER=$PROJECT_ROOT_IN_CONTAINER
31+
ENV FILE_STORAGE_ROOT_IN_CONTAINER=$FILE_STORAGE_ROOT_IN_CONTAINER
32+
ENV JVM_XMS=$JVM_XMS
33+
ENV JVM_XMX=$JVM_XMX
34+
ENV RESOURCES_TYPE=$RESOURCES_TYPE
35+
36+
ENTRYPOINT sh /run-app.sh $PROJECT_ROOT_IN_CONTAINER $FILE_STORAGE_ROOT_IN_CONTAINER $JVM_XMS $JVM_XMX && /bin/sh

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Spring Security Oauth2 Password JPA Implementation
2+
## Overview
3+
4+
* In the Spring Security 6 ecosystem, compared to 5, there is a preference for JSON Web Tokens and Keycloak over traditional OAuth2, and for the Authorization Code flow over the Password Grant method. In this context, the OAuth2 Password Grant method has been implemented with the following advantages:
5+
6+
* Implemented using JPA.
7+
* Authentication management based on a combination of username, client id, and an extra token (referred to in the source code as APP TOKEN, which receives a unique value from the calling devices).
8+
* Separated UserDetails implementation for Admin and Customer roles.
9+
* Integration with spring-security-oauth2-authorization-server.
10+
* Provision of MySQL DDL.
11+
* Application of Spring Rest Docs.
12+
13+
## Dependencies
14+
15+
| Category | Dependencies |
16+
|-------------------|--------------------------------------------|
17+
| Backend-Language | Java 17 |
18+
| Backend-Framework | Spring Boot 3.1.2 |
19+
| Main Libraries | Spring Security Authorization Server 1.2.3 |
20+
| Package-Manager | Maven 3.6.3 (mvnw, Dockerfile) |
21+
| RDBMS | Mysql 8.0.17 |

beforeInstall.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
echo "> Nginx 기반 무중단 배포가 시작됩니다..."

files/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)