{"id":18537853,"url":"https://github.com/netbuffer/spring-boot-demo","last_synced_at":"2025-04-09T17:37:07.098Z","repository":{"id":47137575,"uuid":"134424980","full_name":"netbuffer/spring-boot-demo","owner":"netbuffer","description":"spring-boot-demo spring-boot technology test,DI,IOC，tomcat，mvc，servlet，filter，log，logback，interface，restful，exception，http，build，git，system，json...","archived":false,"fork":false,"pushed_at":"2024-09-12T13:58:59.000Z","size":457,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T09:11:29.399Z","etag":null,"topics":["demo","git","java","java8","lambda","log","logback","maven","plugin","pom","spring","spring-boot","spring-boot2","spring-mvc","springframework","thymeleaf","thymeleaf-template-engine"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netbuffer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-22T14:09:33.000Z","updated_at":"2024-09-13T00:44:33.000Z","dependencies_parsed_at":"2024-09-10T14:54:29.978Z","dependency_job_id":null,"html_url":"https://github.com/netbuffer/spring-boot-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbuffer%2Fspring-boot-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbuffer%2Fspring-boot-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbuffer%2Fspring-boot-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbuffer%2Fspring-boot-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netbuffer","download_url":"https://codeload.github.com/netbuffer/spring-boot-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248078311,"owners_count":21044085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","git","java","java8","lambda","log","logback","maven","plugin","pom","spring","spring-boot","spring-boot2","spring-mvc","springframework","thymeleaf","thymeleaf-template-engine"],"created_at":"2024-11-06T19:40:40.963Z","updated_at":"2025-04-09T17:37:06.773Z","avatar_url":"https://github.com/netbuffer.png","language":"Java","readme":"# spring-boot-demo\n\n![](https://img.shields.io/static/v1?label=java\u0026message=1.8\u0026color=blue)\n![](https://img.shields.io/static/v1?label=spring-boot\u0026message=2.4.5.RELEASE\u0026color=blue)\n![](https://img.shields.io/static/v1?label=spring-restdocs\u0026message=2.0.4.RELEASE\u0026color=blue)\n![](https://img.shields.io/static/v1?label=junit\u0026message=4.13.2\u0026color=black)\n![](https://img.shields.io/static/v1?label=hibernate-validator\u0026message=6.1.7.Final\u0026color=blue)\n\n* use spring-boot 2.x\n* https://shields.io/\n* [github source](https://github.com/netbuffer/spring-boot-demo)\n* [gitee source](https://gitee.com/netbuffer/spring-boot-demo)\n* /actuator/health\n* [spring-boot-2.4.5-reference](https://docs.spring.io/spring-boot/docs/2.4.5/reference/htmlsingle/)\n* [@ControllerAdvice](https://docs.spring.io/spring-framework/docs/5.3.6/reference/html/web.html#mvc-ann-controller-advice)\n* [Exceptions Process](https://docs.spring.io/spring-framework/docs/5.3.6/reference/html/web.html#mvc-ann-exceptionhandler)\n* [ResponseEntityExceptionHandler](https://docs.spring.io/spring-framework/docs/5.3.6/javadoc-api/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.html)\n* [requestmapping](https://docs.spring.io/spring-framework/docs/5.3.6/reference/html/web.html#mvc-ann-requestmapping-registration)\n* [mvc-sse](https://docs.spring.io/spring-framework/docs/5.3.6/reference/html/web.html#mvc-ann-async-sse)\n* [hibernate_validator_reference](https://docs.jboss.org/hibernate/validator/6.2/reference/en-US/pdf/hibernate_validator_reference.pdf#validator-gettingstarted)\n* https://docs.docker.com/compose/compose-file/compose-file-v3/#build\n* https://hub.docker.com/_/openjdk\n\n### server.servlet.session.timeout\n\n```html\nns for nanoseconds\nus for microseconds\nms for milliseconds\ns for seconds\nm for minutes\nh for hours\nd for days\n```\n\n### mvn build test\n\n\u003e `mvn -Dmvn-arg=your param -DskipTests clean package -P test`\n\u003e -Dparam,-Pyour profile\n\n### maven-help-plugin use\n\n* `mvn help:system` Displays a list of the platform details like system properties and environment variables\n* `mvn help:help` Display help information on maven-help-plugin.Call mvn help:help -Ddetail=true -Dgoal=\u003cgoal-name\u003e to display parameter details\n\n### branch\n\n* javamelody\n* spring-restdocs\n* templating-maven-plugin\n* thymeleaf\n* logback\n\n### docker镜像制作\n\n#### 构建\n\n1. 先通过maven打包到target目录下\n2. 执行构建指令：`cd target;docker build -f ../Dockerfile -t netbuffer/spring-boot-demo:1.0 ../` (`docker build -t netbuffer/spring-boot-demo:1.0 .`)\n\n#### 运行\n\n* docker run --rm -it -p 9100:9100 netbuffer/spring-boot-demo:1.0\n* docker-compose up (使用docker-compose启动服务)\n\n#### 发布到DockerHub\n\n\u003e 需要注册DockerHub身份，再docker login登录对应的Registry\n\n1. docker images 找到镜像ID\n2. docker tag 镜像ID 你的DockerHub账户名/spring-boot-demo:1.0 打tag\n3. docker push 你的DockerHub账户名/spring-boot-demo:1.0 推送到远程\n\n#### 远程镜像\n\n\u003e 已发布到DockerHub，可以直接运行以下指令测试\n\u003e https://hub.docker.com/r/javawiki/spring-boot-demo\n\n* docker pull javawiki/spring-boot-demo:1.0          拉取远程镜像\n* docker run -it --rm javawiki/spring-boot-demo:1.0  运行远程镜像\n\n### articles\n\n* [spring-boot中统一修改http响应体内容的方法](https://www.toutiao.com/i7014375995448820231)\n* [spring-boot中异常的处理](https://www.toutiao.com/i7014369292791579148)\n* [关于spring-boot中logback日志配置引用spring环境变量的使用方式](https://www.toutiao.com/i7014368145578230304)\n* [spring-boot生成打包信息](https://www.toutiao.com/i7013891369404351014)\n* [spring-boot生成git版本库信息](https://www.toutiao.com/i7013890854121226789)\n* [Spring Boot动态注册/删除http资源路径的方法](https://www.toutiao.com/i7014752212727431694)\n* [获取SpringBoot工程运行时的操作系统进程ID方法](https://www.toutiao.com/i7015456367477522977)\n* [SpringBoot使用基于json格式的配置方法](https://www.toutiao.com/i7016209186543469069)\n* [怎么查看SpringBoot工程中每个过滤器的执行顺序](https://www.toutiao.com/i7016666337527382532)\n* [Spring中出现NoUniqueBeanDefinitionException的解决方法](https://www.toutiao.com/i7018897444583113247)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetbuffer%2Fspring-boot-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetbuffer%2Fspring-boot-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetbuffer%2Fspring-boot-demo/lists"}