Skip to content

Commit

Permalink
🍺 Modify
Browse files Browse the repository at this point in the history
  • Loading branch information
j3ers3 committed Apr 29, 2022
1 parent a06dc4c commit a8c0611
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ FROM java:8

VOLUME /tmp

ADD javasec.jar app.jar
ADD ./target/javasec-1.7.jar app.jar

EXPOSE 8888

RUN sh -c 'touch /app.jar'

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ spring.datasource.password=1234567
```

### Jar
> JDK 1.8环境
```
git clone https://github.com/j3ers3/Hello-Java-Sec
cd Hello-Java-Sec
Expand All @@ -48,8 +49,11 @@ java -jar target/hello-1.0.0-SNAPSHOT.jar

### Docker
```
bash deploy.sh
mvn clean package
./deploy.sh
```
![](media/16512152886514.jpg)


## 技术架构
- Java 1.8
Expand Down
2 changes: 1 addition & 1 deletion deploy.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker build -t javasec . && docker run -d -p 80:8888 -v /opt/javasec/logs:/logs javasec
docker build -t javasec . && docker run -d -p 80:8888 -v logs:/logs javasec
Binary file added media/16512152886514.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ spring.datasource.username=root
spring.datasource.password=1234567
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
server.port=8888
server.address=127.0.0.1
server.address=0.0.0.0

server.servlet.session.timeout=6h
# Actuator设置全部暴露
Expand All @@ -20,4 +20,4 @@ mybatis.mapper-locations=classpath:mapper/*.xml

# 启动日志
server.tomcat.accesslog.enabled=true
server.tomcat.basedir=./
server.tomcat.basedir=./

0 comments on commit a8c0611

Please sign in to comment.