Skip to content

spring-boot-demo spring-boot technology test,DI,IOC,tomcat,mvc,servlet,filter,log,logback,interface,restful,exception,http,build,git,system,json...

Notifications You must be signed in to change notification settings

netbuffer/spring-boot-demo

Repository files navigation

spring-boot-demo

server.servlet.session.timeout

ns for nanoseconds
us for microseconds
ms for milliseconds
s for seconds
m for minutes
h for hours
d for days

mvn build test

mvn -Dmvn-arg=your param -DskipTests clean package -P test -Dparam,-Pyour profile

maven-help-plugin use

  • mvn help:system Displays a list of the platform details like system properties and environment variables
  • mvn help:help Display help information on maven-help-plugin.Call mvn help:help -Ddetail=true -Dgoal= to display parameter details

branch

  • javamelody
  • spring-restdocs
  • templating-maven-plugin
  • thymeleaf
  • logback

docker镜像制作

构建

  1. 先通过maven打包到target目录下
  2. 执行构建指令:cd target;docker build -f ../Dockerfile -t netbuffer/spring-boot-demo:1.0 ../ (docker build -t netbuffer/spring-boot-demo:1.0 .)

运行

  • docker run --rm -it -p 9100:9100 netbuffer/spring-boot-demo:1.0
  • docker-compose up (使用docker-compose启动服务)

发布到DockerHub

需要注册DockerHub身份,再docker login登录对应的Registry

  1. docker images 找到镜像ID
  2. docker tag 镜像ID 你的DockerHub账户名/spring-boot-demo:1.0 打tag
  3. docker push 你的DockerHub账户名/spring-boot-demo:1.0 推送到远程

远程镜像

已发布到DockerHub,可以直接运行以下指令测试 https://hub.docker.com/r/javawiki/spring-boot-demo

  • docker pull javawiki/spring-boot-demo:1.0 拉取远程镜像
  • docker run -it --rm javawiki/spring-boot-demo:1.0 运行远程镜像

articles

About

spring-boot-demo spring-boot technology test,DI,IOC,tomcat,mvc,servlet,filter,log,logback,interface,restful,exception,http,build,git,system,json...

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published