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 ...
随机推荐
- SQL数据库问题 解释一下下面的代码 sql 存储过程学习
SQL数据库问题 解释一下下面的代码 2008-08-13 11:30wssqyl2000 | 分类:数据库DB | 浏览1154次 use mastergocreate proc killspid( ...
- Enter the path to the kernel header files for the 3.18.0-kali1-686-pae kerne vmware tool
安装VMWare Tools出现提示:Enter the path to the kernel header files for the 3.18.0-kali1-686-pae kerne? 201 ...
- Python 33(1) UDP协议 数据报协议 socketsever模块
一:基于UDP协议通信的套接字 基于UDP协议 只要是套接字,在开发的过程中一定要有服务端和客户端. UDP协议说的就是数据报协议,也就是说,基于UDP协议来发数据,每发一个数据,都是带有报头的数据 ...
- php 过滤敏感关键词
php 过滤敏感关键词 function badwords($content){ $keywords=M("config")->where("name='badwo ...
- E - Perfect Number
Problem description We consider a positive integer perfect, if and only if the sum of its digits is ...
- inline-block默认间距解决方法
方法一: 父元素设置font-size: 0; 行内块元素有文字时再在该元素上设置font-size 方法二: 父元素设置word-spacing为负 方法三: Inline-block 元素浮 ...
- springBoot jar/war打包部署问题
先给pom.xml配置导出插件 <!--配置插件将Maven 插件 导出成为jar --> <plugin> <groupId>org.springframewor ...
- word中选择嵌入式时图片被遮住,只显示小部分的解决方法
选中图片,点击如下 选择 行距选项 将行距改为单位行距即可.
- Eclipse代码自动提示(内容辅助content assist)
Eclipse中默认是输入"."后出现自动提示,用于类成员的自动提示,可是有时候我们希望它能在我们输入类的首字母后就出现自动提示,可以节省大量的输入时间(虽然按alt + /会出现 ...
- 对学Oracle数据库初学者的开场篇
前言:因为项目原因,近期开始学习Oracle数据库.Oracle是目前最流行的数据库之一,功能强大,性能卓越,相对的学习的难度还是不小.我打算将自己的学习过程记录下来,做个积累,方便自己和其他的学习者 ...