Spring bean reflection

This commit is contained in:
crusader 2017-08-09 11:30:33 +09:00
parent 134a1e887f
commit f71184fe95
4 changed files with 47 additions and 21 deletions

View File

@ -1,8 +1,24 @@
FROM openjdk:8-jdk-alpine
MAINTAINER Loafle <rnd@loafle.com>
ARG APP_FILENAME="com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar"
ENV APP_FILENAME="com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar"
ADD docker/bin/*.sh /opt/bin/
RUN apk add --no-cache curl \
&& chmod +x /opt/bin/*.sh
ADD target/lib /service/lib
ADD target/com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar /service/
ENTRYPOINT ["/usr/bin/java", "-jar", "/service/com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar"]
ENV TINI_VERSION='0.14.0' \
TINI_SHA='6c41ec7d33e857d4779f14d9c74924cab0c7973485d2972419a3b7c7620ff5fd'
# Use tini as subreaper in Docker container to adopt zombie processes
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
&& echo "$TINI_SHA /bin/tini" | sha256sum -c -
EXPOSE 50006
ENTRYPOINT ["/bin/tini", "--", "/opt/bin/docker-entrypoint.sh"]

View File

@ -1,25 +1,24 @@
version: "3"
services:
# overFlow-dao:
# restart: always
# build: ./
# container_name: overFlow-dao
# volumes:
# ports:
# - "9080:80"
overFlow-server:
restart: always
image: docker.loafle.net/overflow/overflow_server:1.0.0-SNAPSHOT
container_name: overFlow-server
ports:
- "50006:50006"
postgresql:
restart: always
image: postgres:9.6-alpine
container_name: overFlow-dao-postgres
environment:
- POSTGRES_DB=overflow
- POSTGRES_USER=overflow
- POSTGRES_PASSWORD=qwer5795
# - POSTGRES_INITDB_ARGS="--data-checksums"
ports:
- "5432:5432"
# postgresql:
# restart: always
# image: postgres:9.6-alpine
# container_name: overFlow-dao-postgres
# environment:
# - POSTGRES_DB=overflow
# - POSTGRES_USER=overflow
# - POSTGRES_PASSWORD=qwer5795
# # - POSTGRES_INITDB_ARGS="--data-checksums"
# ports:
# - "5432:5432"
# docker-compose up -d
# docker-compose stop

View File

@ -0,0 +1,11 @@
#!/bin/sh
set -e
cd /service
#/usr/bin/java -cp lib/*.jar -jar "com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar" 50006
/usr/bin/java -cp com.loafle.overflow.overflow_server-1.0.0-SNAPSHOT.jar:lib/* com.loafle.overflow.OFMain 50006
exec "$@"

View File

@ -155,7 +155,7 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>