当前位置: 首页 > news >正文

网站项目开发的流程女人和男人做爰网站

网站项目开发的流程,女人和男人做爰网站,网站建设开发外包公司,广州关键词排名推广这里写目录标题 1 介绍2 使用2.1 开启 hook2.2 禁用 hook 3 手动指定 hook 1 介绍 SpringBoot 如果需要使用hook则需要开启spring.main.register-shutdown-hooktrue(默认为true) 如果使用kill -9则不会出发JVM的hook,kill可以正常触发hook server:port: 8080shutd…

这里写目录标题

  • 1 介绍
  • 2 使用
    • 2.1 开启 hook
    • 2.2 禁用 hook
  • 3 手动指定 hook

1 介绍

SpringBoot 如果需要使用hook则需要开启spring.main.register-shutdown-hook=true(默认为true)
如果使用kill -9则不会出发JVM的hook,kill可以正常触发hook

server:port: 8080shutdown: IMMEDIATE #GRACEFUL/IMMEDIATE (默认IMMEDIATE)spring:main:register-shutdown-hook: true #默认ture

2 使用

package com.example.java.test;import jakarta.annotation.PreDestroy;
import org.springframework.stereotype.Component;/*** @author hyacinth* @date 2023/10/13 23:07* @desc: 测试* @title: Test* @package com.example.java.test*/
@Component
public class Test {@PreDestroypublic void destroy() {System.out.println("销毁");}public Test() {System.out.println("创建");}}

2.1 开启 hook

如果spring.main.register-shutdown-hook=true

  .   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::                (v3.1.4)2023-10-13T23:11:26.801+08:00  INFO 18244 --- [  restartedMain] com.example.java.JavaApplication         : Starting JavaApplication using Java 21 with PID 18244 (D:\SourceCode\Intellij\java\target\classes started by xuhya in D:\SourceCode\Intellij\java)
2023-10-13T23:11:26.805+08:00  INFO 18244 --- [  restartedMain] com.example.java.JavaApplication         : No active profile set, falling back to 1 default profile: "default"
2023-10-13T23:11:26.916+08:00  INFO 18244 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2023-10-13T23:11:26.916+08:00  INFO 18244 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2023-10-13T23:11:28.594+08:00  INFO 18244 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2023-10-13T23:11:28.622+08:00  INFO 18244 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-10-13T23:11:28.623+08:00  INFO 18244 --- [  restartedMain] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.13]
2023-10-13T23:11:28.696+08:00  INFO 18244 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-10-13T23:11:28.697+08:00  INFO 18244 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1779 ms
创建
2023-10-13T23:11:29.308+08:00  INFO 18244 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2023-10-13T23:11:29.386+08:00  INFO 18244 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2023-10-13T23:11:29.403+08:00  INFO 18244 --- [  restartedMain] com.example.java.JavaApplication         : Started JavaApplication in 3.274 seconds (process running for 3.915)
销毁Process finished with exit code 130

2.2 禁用 hook

如果spring.main.register-shutdown-hook=false

如果spring.main.register-shutdown-hook=true```java.   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::                (v3.1.4)2023-10-13T23:11:26.801+08:00  INFO 18244 --- [  restartedMain] com.example.java.JavaApplication         : Starting JavaApplication using Java 21 with PID 18244 (D:\SourceCode\Intellij\java\target\classes started by xuhya in D:\SourceCode\Intellij\java)
2023-10-13T23:11:26.805+08:00  INFO 18244 --- [  restartedMain] com.example.java.JavaApplication         : No active profile set, falling back to 1 default profile: "default"
2023-10-13T23:11:26.916+08:00  INFO 18244 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2023-10-13T23:11:26.916+08:00  INFO 18244 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2023-10-13T23:11:28.594+08:00  INFO 18244 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2023-10-13T23:11:28.622+08:00  INFO 18244 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-10-13T23:11:28.623+08:00  INFO 18244 --- [  restartedMain] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.13]
2023-10-13T23:11:28.696+08:00  INFO 18244 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-10-13T23:11:28.697+08:00  INFO 18244 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1779 ms
创建
2023-10-13T23:11:29.308+08:00  INFO 18244 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2023-10-13T23:11:29.386+08:00  INFO 18244 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2023-10-13T23:11:29.403+08:00  INFO 18244 --- [  restartedMain] com.example.java.JavaApplication         : Started JavaApplication in 3.274 seconds (process running for 3.915)Process finished with exit code 130

3 手动指定 hook

package com.example.java;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication
public class JavaApplication {public static void main(String[] args) {SpringApplication.run(JavaApplication.class, args);Runtime.getRuntime().addShutdownHook(new Thread(() -> {System.out.println("服务已停止");}));}}
  .   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::                (v3.1.4)2023-10-13T23:15:08.667+08:00  INFO 16108 --- [  restartedMain] com.example.java.JavaApplication         : Starting JavaApplication using Java 21 with PID 16108 (D:\SourceCode\Intellij\java\target\classes started by xuhya in D:\SourceCode\Intellij\java)
2023-10-13T23:15:08.671+08:00  INFO 16108 --- [  restartedMain] com.example.java.JavaApplication         : No active profile set, falling back to 1 default profile: "default"
2023-10-13T23:15:08.752+08:00  INFO 16108 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2023-10-13T23:15:08.752+08:00  INFO 16108 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2023-10-13T23:15:10.314+08:00  INFO 16108 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2023-10-13T23:15:10.335+08:00  INFO 16108 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-10-13T23:15:10.335+08:00  INFO 16108 --- [  restartedMain] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.13]
2023-10-13T23:15:10.402+08:00  INFO 16108 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-10-13T23:15:10.403+08:00  INFO 16108 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1649 ms
创建
2023-10-13T23:15:10.914+08:00  INFO 16108 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2023-10-13T23:15:10.996+08:00  INFO 16108 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2023-10-13T23:15:11.015+08:00  INFO 16108 --- [  restartedMain] com.example.java.JavaApplication         : Started JavaApplication in 3.038 seconds (process running for 3.626)
服务已停止
http://www.yayakq.cn/news/34032/

相关文章:

  • 网站建设的脑图规划培训网站开发需求说明书
  • 淘宝客做网站怎样推广北京鑫创网站建设
  • 网站建设中如何使用字体如何做个网站做cpa
  • 承德微网站建设网站设计大小
  • 用ul做的网站为何浮动不上去大连金州旅游景点有哪些
  • 建设企业网站就等于开展网络营销做网站的软件 知乎
  • 焦作市网站建设哪家好标书制作是干啥的
  • 黄埔区做网站6免费网站建站
  • 移动网站 用户体验重庆建设医院官方网站
  • 有哪些做婚礼平面设计的网站山东省工程建设招标信息网站
  • 网站怎么更新网站开发平台工具
  • 小说网站制作开源网站建设云创
  • 品牌网十大品牌排行榜衡水网站建设优化排名
  • 网站开发有几种焦作 做 网站
  • 网络宣传网站建设价格手机网站建设好吗
  • 网站开发文档总结wordpress标签加标题
  • 怎么注册网站挣流量sem 优化价格
  • 网站备案信息被工信部删除营销型网站建设专家
  • 阿里巴巴官方网站商丘的网络公司
  • 官网网站建设公司网络营销推广活动
  • 建设网站账号密码不区分大小写wordpress字體調整控制
  • 网站后台如何做wordpress打赏分享
  • 怎么在网站中添加百度商桥深圳网站建设评价
  • 云网站 制作手机膜+东莞网站建设
  • 系部网站建设中期检查总结做电影ppt模板下载网站
  • 公众号微网站建设认证广告公司经营范围有哪些内容
  • 怎么把统计代码加到网站烟台网络公司经营范围
  • 如何做高端网站苏州网站建设系统找哪家
  • 网站打开速度慢wordpress杭州网站定制开发
  • 最超值的网站建设长宁区科技网站建设