![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
rich@cai
这个作者很懒,什么都没留下…
展开
-
SpringBoot引入第三方jar包的处理方式打成jar或者war
在项目开发中不可避免会遇到引入第三方jar包的情况,这些第三方jar是在Maven仓库中没有的。有两种处理方式:将jar包安装在本地maven库(本地私服)将jar包放入项目目录中。常见的打包方式又分为两种,打成jar包或者打成war包。1.打成jar包假如我们的第三方jar放置在项目根路径下,即:此时,我们在pom.xml中这么配置: <!--本地开发的ILEDCloudSDK 其中groupId,artifactId,version自定义--> <depend原创 2021-11-05 13:32:07 · 482 阅读 · 0 评论 -
springboot PropertySource yml
yml文件来增加新的属性配置,新增属性放在application.yml中是没问题的,但是放其他文件中,然后通过@PropertySource 引入时,却出现了问题,所有.yml中的参数配置全部读取无效,properties文件是正常的,后来在stackoverflow上看到@PropertySource中存在factory参数,通过配置factory参数可以达到我们想要的效果。@PropertySource factory属性的factory默认配置是Class<? extends Propert原创 2021-10-12 14:15:30 · 357 阅读 · 0 评论 -
springboot指定端口的三种方式
springboot指定端口的三种方式第一配置文件中添加server.port=9090第二在命令行中指定启动端口,比如传入参数一server. port=9000 java -jar bootsample. jar – server.port=9000第三传入虚拟机系统属性java - Dserver.port=9000 -jar bootsample.jar...原创 2021-07-09 21:07:10 · 1507 阅读 · 0 评论 -
springboot jar 开启关闭
linux下:1.开启nohup java -jar (jar包名)2.后台停止先找到进程ps aux|grep (jar包名)kill -9 进程号(红色标记)window下输出 java -jar zip然后按tab键自动补全就可以了停止java项目cmd 输入 jps 可以看到 jar的PID或者关掉开启的 cmd...原创 2021-07-06 15:00:46 · 519 阅读 · 0 评论 -
Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-reso
问题:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project demo: Input length = 1 -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swi原创 2021-07-06 14:33:04 · 332 阅读 · 1 评论 -
springboot项目 LoggerFactory is not a Logback LoggerContext but Logback ison the classpath.
原因:log4j日志组件和自带logback日志组件冲突。解决方法:将默认日志组件排除。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <!-- 去除logback的依赖 --> <exclusions> <exc原创 2021-06-16 10:42:52 · 135 阅读 · 0 评论