Spring Boot项目在Mac下使用Maven启动时碰到的神奇问题:Unregistering JMX-exposed beans on shutdown
错误如下:
➜ springboottest1 mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building springboottest1 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.4.7.RELEASE:run (default-cli) > test-compile @ springboottest1 >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ springboottest1 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/Jim/Desktop/springboottest1/src/main/resources
[INFO] skip non existing resourceDirectory /Users/Jim/Desktop/springboottest1/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ springboottest1 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /Users/Jim/Desktop/springboottest1/target/classes
[WARNING] 读取/Users/Jim/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.15/tomcat-embed-core-8.5.15.jar时出错; invalid LOC header (bad signature)
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ springboottest1 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/Jim/Desktop/springboottest1/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ springboottest1 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/Jim/Desktop/springboottest1/target/test-classes
[WARNING] 读取/Users/Jim/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.15/tomcat-embed-core-8.5.15.jar时出错; invalid LOC header (bad signature)
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.4.7.RELEASE:run (default-cli) < test-compile @ springboottest1 <<<
[INFO]
[INFO] --- spring-boot-maven-plugin:1.4.7.RELEASE:run (default-cli) @ springboottest1 --- . ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.7.RELEASE) 2017-08-17 15:50:23.713 INFO 2562 --- [ main] c.j.springboottest.springboottest1.App : Starting App on JimdeMacBook-Pro.local with PID 2562 (/Users/Jim/Desktop/springboottest1/target/classes started by Jim in /Users/Jim/Desktop/springboottest1)
2017-08-17 15:50:23.716 INFO 2562 --- [ main] c.j.springboottest.springboottest1.App : No active profile set, falling back to default profiles: default
2017-08-17 15:50:23.777 INFO 2562 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@220b740b: startup date [Thu Aug 17 15:50:23 CST 2017]; root of context hierarchy
2017-08-17 15:50:25.248 INFO 2562 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-08-17 15:50:25.267 INFO 2562 --- [ main] c.j.springboottest.springboottest1.App : Started App in 12.251 seconds (JVM running for 16.751)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.357 s
[INFO] Finished at: 2017-08-17T15:50:25+08:00
[INFO] Final Memory: 30M/379M
[INFO] ------------------------------------------------------------------------
2017-08-17 15:50:25.494 INFO 2562 --- [ Thread-1] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@220b740b: startup date [Thu Aug 17 15:50:23 CST 2017]; root of context hierarchy
2017-08-17 15:50:25.496 INFO 2562 --- [ Thread-1] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
从上面的问题可以看出,是tomcat的Jar包读取失败,那么解决方法时进入到本地仓库把这个目录下的全部包删除,然后再重新构建即可解决。
总结:
一般使用Maven做依赖时,会碰到很多莫名其妙的问题,或许删除本地库的包再重新下载一次也是一种解决方法,尤其对于那种正确配置之后的项目不能运行的情况。
Spring Boot项目在Mac下使用Maven启动时碰到的神奇问题:Unregistering JMX-exposed beans on shutdown的更多相关文章
- 多个Spring Boot项目部署在一个Tomcat容器无法启动
转自https://www.cnblogs.com/tomxin7/p/9434085.html 业务介绍 最近用Spring Boot开发了一个翻译的小项目,但是服务器上还跑着其他项目,包括一个同样 ...
- Spring Boot 项目实战(一)Maven 多模块项目搭建
一.前言 最近公司项目准备开始重构,框架选定为 Spring Boot ,本篇主要记录了在 IDEA 中搭建 Spring Boot Maven 多模块项目的过程. 二.软件及硬件环境 macOS S ...
- spring boot 项目从配置文件中读取maven 的pom.xml 文件标签的内容。
需求: 将pom.xml 文件中的版本号读取到配置文件并打印到日志中. 第一步: 在pom.xml 中添加以下标签. 第二步: 将version 标签的值读取到配置文件中 这里使用 @@ 而不是 ...
- 【spring cloud】子模块module -->导入一个新的spring boot项目作为spring cloud的一个子模块微服务,怎么做/或者 每次导入一个新的spring boot项目,IDEA不识别子module,启动类无法启动/右下角没有蓝色图标
如题:导入一个新的spring boot项目作为spring cloud的一个子模块微服务,怎么做 或者说每次导入一个新的spring boot项目,IDEA不识别,启动类无法启动,怎么解决 下面分别 ...
- Spring Boot 项目实战(五)集成 Dubbo
一.前言 上篇介绍了 Redis 的集成过程,可用于解决热点数据访问的性能问题.随着业务复杂度的提高,单体应用越来越庞大,就好比一个类的代码行数越来越多,分而治之,切成多个类应该是更好的解决方法,所以 ...
- spring boot学习01【搭建环境、创建第一个spring boot项目】
1.给eclipse安装spring boot插件 Eclipse中安装Spring工具套件(STS): Help -> Eclipse Marketplace... 在Search标签或者Po ...
- Spring Boot 项目集成 Alibaba Druid
Druid 是一个非常好用的数据库连接池,但是他的好并不止体现在作为一个连接池加快数据访问性能上和连接管理上,他带有一个强大的监控工具:Druid Monitor.不仅可以监控数据源和慢查询,还可以监 ...
- Myeclipse下使用Maven搭建spring boot项目
开发环境:Myeclipse2017.JDK1.6.Tomcat 8.0.Myeclipse下使用Maven搭建spring boot项目,详细过程如下: 1. New -> Project.. ...
- Myeclipse下使用Maven搭建spring boot项目(第二篇)
现在需要搭建spring boot框架,并实现一个HelloWorld的项目,让程序真正运行起来. 一.在pom.xml中引入spring-boot-start-parent,spring官方的叫st ...
随机推荐
- 【SDOI 2010】 魔法猪学院
[题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=1975 [算法] A*求k短路 [代码] #include<bits/stdc+ ...
- Thinkpad E450c进入BIOS
重启系统,一直按F12,进入系统设置后,按tab进入App Menu选项卡,选择Setup按回车进入BIOS设置
- oen /var/run/nginx.pid failed
nginx: [error] open() "/var/run/nginx.pid" failed (2: No such file or directory) [root@TES ...
- vim的快捷键大全
vim是开发利器,掌握快捷可以事半功倍,这里总结下常用的快捷键,提高开发速度这里写代码片 1.vim ~/.vimrc 进入配置文件 如果不知道vimrc文件在哪,可使用 :scriptnames 来 ...
- bcg库使用心得两则
作者:朱金灿 来源:http://blog.csdn.net/clever101 最近帮同事解决了两个BCG库的使用问题,特记录下来. 一是在outlook风格停靠栏上创建对话框的做法.代码如下: C ...
- word中选择嵌入式时图片被遮住,只显示小部分的解决方法
选中图片,点击如下 选择 行距选项 将行距改为单位行距即可.
- 省市区县的sql语句——城市
/*SQLyog v10.2 MySQL - 5.5.48 : Database - 省市县****************************************************** ...
- 【oracle开发】wmsys.wm_concat介绍
wmsys.wm_concat是一个聚合函数,其作用是将一列数据转换成一行,也就是我们常用的行专列,但是该函数是一个undocument函数,所以不推荐大家使用这个函数.因为在后续的版本中还提不提供这 ...
- OpenCV:OpenCV目标检测Hog+SWindow源代码分析
参考文章:OpenCV中的HOG+SVM物体分类 此文主要描述出HOG分类的调用堆栈. 使用OpenCV作图像检测, 使用HOG检测过程,其中一部分源代码如下: 1.HOG 检测底层栈的检测计算代码: ...
- 06--谈谈:C++类的“包含”机制
谈谈:C++类的“包含”机制 本人在学习Qt的时候发现了一个非常有趣的现象.有很多函数的调用方法都写成了如下的形式: object.func().func2(); 这令小弟着实不懂.在上面这段代码 ...