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

常州市住房建设局网站上海互联网网站建设

常州市住房建设局网站,上海互联网网站建设,贵阳网站建设在线,线上商城如何推广热部署的主要作用是在服务器运行的时候可以在不关闭服务器的情况下修改代码 可以很大的提高开发效率 热部署的步骤很简单 首先&#xff0c;需要在 pom.xml 文件中引入热部署需要的依赖 <dependency><groupId>org.springframework.boot</groupId><artif…

热部署的主要作用是在服务器运行的时候可以在不关闭服务器的情况下修改代码

可以很大的提高开发效率

热部署的步骤很简单

首先,需要在 pom.xml 文件中引入热部署需要的依赖

        <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><optional>true</optional></dependency>

然后我们在每次修改代码后按 ctrl + F9 即可将代码更新

测试热部署是否生效

先启动spring boot 的 main 方法

    public static void main(String[] args) {
//        System.out.println("热部署测试");SpringApplication.run(SSMPApplication.class, args);}

然后我们将注释放开,按下 ctrl + F9,等待右下角读条结束后就会更新控制台信息:

 :: Spring Boot ::                (v2.5.4)

2024-09-23 22:18:27.534  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : Starting SSMPApplication using Java 17 on 大宝贝 with PID 14364 (E:\ideaItem\springboot_08_ssmp\target\classes started by 陈炫宇 in E:\ideaItem\text2)
2024-09-23 22:18:27.540  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : No active profile set, falling back to default profiles: default
2024-09-23 22:18:27.594  INFO 14364 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2024-09-23 22:18:27.594  INFO 14364 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2024-09-23 22:18:28.354  INFO 14364 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 80 (http)
2024-09-23 22:18:28.361  INFO 14364 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-09-23 22:18:28.361  INFO 14364 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.52]
2024-09-23 22:18:28.408  INFO 14364 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-09-23 22:18:28.408  INFO 14364 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 814 ms
2024-09-23 22:18:28.470  INFO 14364 --- [  restartedMain] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2024-09-23 22:18:28.568  INFO 14364 --- [  restartedMain] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited
 _ _   |_  _ _|_. ___ _ |    _ 
| | |\/|_)(_| | |_\  |_)||_|_\ 
     /               |         
                        3.4.3 
2024-09-23 22:18:28.987  INFO 14364 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2024-09-23 22:18:29.027  INFO 14364 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 80 (http) with context path ''
2024-09-23 22:18:29.027  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : Started SSMPApplication in 1.802 seconds (JVM running for 2.395)
2024-09-23 22:18:45.718  INFO 14364 --- [       Thread-5] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closing ...
2024-09-23 22:18:45.718  INFO 14364 --- [       Thread-5] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed
热部署测试

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.5.4)

2024-09-23 22:18:45.777  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : Starting SSMPApplication using Java 17 on 大宝贝 with PID 14364 (E:\ideaItem\springboot_08_ssmp\target\classes started by 陈炫宇 in E:\ideaItem\text2)
2024-09-23 22:18:45.779  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : No active profile set, falling back to default profiles: default
2024-09-23 22:18:45.938  INFO 14364 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 80 (http)
2024-09-23 22:18:45.942  INFO 14364 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-09-23 22:18:45.942  INFO 14364 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.52]
2024-09-23 22:18:45.966  INFO 14364 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-09-23 22:18:45.966  INFO 14364 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 186 ms
2024-09-23 22:18:45.992  INFO 14364 --- [  restartedMain] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2024-09-23 22:18:46.029  INFO 14364 --- [  restartedMain] com.alibaba.druid.pool.DruidDataSource   : {dataSource-2} inited
 _ _   |_  _ _|_. ___ _ |    _ 
| | |\/|_)(_| | |_\  |_)||_|_\ 
     /               |         
                        3.4.3 
2024-09-23 22:18:46.181  INFO 14364 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2024-09-23 22:18:46.196  INFO 14364 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 80 (http) with context path ''
2024-09-23 22:18:46.199  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : Started SSMPApplication in 0.442 seconds (JVM running for 19.555)
2024-09-23 22:18:46.201  INFO 14364 --- [  restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
2024-09-23 22:18:47.644  INFO 14364 --- [       Thread-7] com.alibaba.druid.pool.DruidDataSource   : {dataSource-2} closing ...
2024-09-23 22:18:47.647  INFO 14364 --- [       Thread-7] com.alibaba.druid.pool.DruidDataSource   : {dataSource-2} closed
热部署测试

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.5.4)

2024-09-23 22:18:47.693  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : Starting SSMPApplication using Java 17 on 大宝贝 with PID 14364 (E:\ideaItem\springboot_08_ssmp\target\classes started by 陈炫宇 in E:\ideaItem\text2)
2024-09-23 22:18:47.694  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : No active profile set, falling back to default profiles: default
2024-09-23 22:18:47.870  INFO 14364 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 80 (http)
2024-09-23 22:18:47.870  INFO 14364 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2024-09-23 22:18:47.873  INFO 14364 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.52]
2024-09-23 22:18:47.887  INFO 14364 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2024-09-23 22:18:47.887  INFO 14364 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 192 ms
2024-09-23 22:18:47.900  INFO 14364 --- [  restartedMain] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2024-09-23 22:18:47.926  INFO 14364 --- [  restartedMain] com.alibaba.druid.pool.DruidDataSource   : {dataSource-3} inited
 _ _   |_  _ _|_. ___ _ |    _ 
| | |\/|_)(_| | |_\  |_)||_|_\ 
     /               |         
                        3.4.3 
2024-09-23 22:18:48.029  INFO 14364 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2024-09-23 22:18:48.039  INFO 14364 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 80 (http) with context path ''
2024-09-23 22:18:48.044  INFO 14364 --- [  restartedMain] com.itheima.SSMPApplication              : Started SSMPApplication in 0.371 seconds (JVM running for 21.4)
2024-09-23 22:18:48.044  INFO 14364 --- [  restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
 

http://www.yayakq.cn/news/897534/

相关文章:

  • 合肥网站建设哪里好外贸公司取名
  • 建设什么网站可以赚钱红色简约的手机社区类网站html5响应式模板下载
  • 沈阳网站建设小志均安建网站
  • 合肥网站建设合肥中国软件网
  • 北京建站长沙快速排名优化
  • 泰国如何做网站推广外链是不是把自己的网站信息发布到别人的网站上?
  • 价格低的自动挡汽车青岛seo网站建设
  • 婚纱网站有哪些怎么查询网站备案接入商
  • 网站开发 行业动态wordpress dux主题1.8
  • 海南网站建设获客网站建设与规划案例
  • 湖南十大传媒公司怎样优化关键词到首页
  • 网站首页网址应该有对应的域名新公司流程
  • 没有网站做APP网站设计与网页制作招聘
  • 做网站联系我们在那个板块里面百度知道官网入口
  • 做qq主题的网站网站建设对于企业的必要性
  • h5网站需要哪些技术活动页面模板
  • 查询关键词网站html基本结构
  • 电商网站前台功能模块asp网站源码
  • 设计素材网站那个好制作旅游景点介绍网页
  • wordpress建站全过程wordpress4.9标签404
  • 郑州高端做网站上海模板建站平台
  • 东莞市一建建设工程有限公司织梦网站是不是容易做seo
  • 蓝衫网站建设天津做网站印标
  • 地方性资讯门户网站支付网站开发
  • 淘宝属于什么网站怎么做怎么做官网主页
  • 实验建设网站 南京林业大学jquery 案例网站
  • 重庆专业网站推广费用手机网站跳转
  • 开公司注册空头公司做网站html5做网站总结
  • 扬州网站建设开发最安全的域名注册商
  • 高端的平面设计网站济南seo快速霸屏