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 ...
随机推荐
- mysql重设root的密码 mac
创建: 2017/09/14 第一步: 关闭已开启的mysql服务器 mysql.server stop 第二步: 关闭密码识别模式 /usr/local/bin/mysqld_safe ...
- Gold Balanced Lineup(hash)
http://poj.org/problem?id=3274 ***** #include <stdio.h> #include <iostream> #include < ...
- hdu3555Bomb(数位dp)
Bomb Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submi ...
- Django day15 (二) csrf的 跨站请求伪造 与 局部禁用 , 局部使用
一: csrf 的跨站请求伪造 二: csrf 的局部禁用 , 局部使用
- [NOI2015,LuoguP2146]软件包管理器------树剖
***题目链接戳我*** 又是在树上瞎搞滴题目.... 我们如果以安装的软件为1,未安装的软件为0,那么软件改变的数量即树上权值总和的数量,涉及到区间修改,区间查询,考虑树剖 分析完毕,似乎没啥好说的 ...
- SnackDown Online Pre-elimination round A
1. 应该n是偶数,就行吧.应该判断1个人,只能出现一次吧. #include<bits/stdc++.h> #define pb push_back typedef long long ...
- indeed 4.22 第一次网测
1.第一题 没有看 2. 由于数据范围很小,所以每一层需要全排列,寻找最小的花费,然后所有层加起来就是最后的结果. #include<bits/stdc++.h> #define pb p ...
- reduce多种方法计算数组中某个值的出现次数
先来了解下reduce用法 arr.reduce(callback[, initialValue]) callback执行数组中每个值的函数,包含四个参数: accumulator 累计器累计回调的返 ...
- 苹果双系统win8.1遇到的一些问题
MacBook air是一款不错的电脑,详细没研究就不叙述好与坏了.只此记录自己使用这款笔记本遇到的问题. 一.安装双系统win8.1 1.下载镜像文件—>拷贝到ios内存中,一个8GU盘.ht ...
- JavaScript+CSS交互
当鼠标移动到小图片上时,小图片显示红色边框并在上面大图片显示相应大图片,效果如图: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans ...