随笔分类 -  springboot

摘要:<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> 阅读全文
posted @ 2021-05-31 11:01 jentary 阅读(43) 评论(0) 推荐(0) 编辑
摘要:public class EnvironmentTest { @Test public void propertyTest() { // Java 系统属性 String key = "java.home"; StandardEnvironment environment = new Standar 阅读全文
posted @ 2020-11-20 15:02 jentary 阅读(1446) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/free-wings/p/10254998.html 1.服务端(消息提供者) springboot amqp 默认非持久化 <parent> <groupId>org.springframework.boot</groupId> <artifactI 阅读全文
posted @ 2020-09-02 19:05 jentary 阅读(273) 评论(0) 推荐(0) 编辑
摘要:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/P 阅读全文
posted @ 2020-09-02 17:05 jentary 阅读(168) 评论(0) 推荐(0) 编辑
摘要:使用SpringBoot 默认的StandardServletMultipartResolver,不依赖commons-fileupload。 使用commons-fileupload的CommonsMultipartResolver, 排除默认 spring: autoconfigure: exc 阅读全文
posted @ 2020-08-24 13:14 jentary 阅读(232) 评论(0) 推荐(0) 编辑
摘要:idea 启动类有启动按钮,点击没反应问题 打开idea file-settings搜索插件找到Groovy这个然后把这个插件enable前面的对勾去掉即可。 idea 启动问题解决 Command line is too long. In order to reduce its length cl 阅读全文
posted @ 2020-06-24 12:33 jentary 阅读(648) 评论(0) 推荐(0) 编辑
摘要:1.打包jar <packaging>jar</packaging> <build> <!-- 定义包含这些资源文件,能在jar包中获取这些文件 --> <resources> <resource> <directory>src/main/java</directory> <includes> <i 阅读全文
posted @ 2020-04-07 11:04 jentary 阅读(176) 评论(0) 推荐(0) 编辑
摘要:ctrl + shift + a 搜索命令:registry –> 勾选compiler.automake.allow.when.app.running* <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spr 阅读全文
posted @ 2020-01-20 10:33 jentary 阅读(186) 评论(0) 推荐(0) 编辑
摘要:# # COMMON SPRING BOOT PROPERTIES## This sample file is provided as a guideline. Do NOT copy it in its# entirety to your own application. ^^^# # # COR 阅读全文
posted @ 2020-01-08 10:19 jentary 阅读(258) 评论(0) 推荐(0) 编辑
摘要:自动配置中使用的条件化注解 条件化注解 配置生效条件@ConditionalOnBean 配置了某个特定Bean@ConditionalOnMissingBean 没有配置特定的Bean@ConditionalOnClass Classpath里有指定的类@ConditionalOnMissingC 阅读全文
posted @ 2019-10-09 17:23 jentary 阅读(152) 评论(0) 推荐(0) 编辑
摘要:一、静态属性 1、配置文件属性映射(完全映射,名称必须一致) @Value(value="${config.name}") 2、有时候属性太多了,一个个绑定到属性字段上太累,官方提倡绑定一个对象的bean,这里我们建一个ConfigBean.java类,顶部需要使用注解@ConfigurationP 阅读全文
posted @ 2019-08-21 10:57 jentary 阅读(232) 评论(0) 推荐(0) 编辑
摘要:在Spring Boot中多环境配置文件名需要满足application-{profile}.properties的格式,其中{profile}对应你的环境标识,比如: application-dev.properties:开发环境 application-prod.properties:生产环境 阅读全文
posted @ 2019-06-18 09:39 jentary 阅读(163) 评论(0) 推荐(0) 编辑
摘要:ConditionalOnClass :用于指定在Classpath下拥有某些Class时才生效 ConditionalOnMissingClass :用于指定在Classpath下不存在某些Class时才生效 ConditionalOnBean :用于指定在bean容器中存在某些bean时生效 C 阅读全文
posted @ 2019-06-18 09:18 jentary 阅读(164) 评论(0) 推荐(0) 编辑
摘要:config.name=configname config.password=configpassword @Configuration @ConfigurationProperties(prefix = "config") @PropertySource("classpath:/config.pr 阅读全文
posted @ 2019-06-17 10:55 jentary 阅读(186) 评论(0) 推荐(0) 编辑
摘要:覆盖默认版本 <properties> <spring-data-releasetrain.version>Fowler-SR2</spring-data-releasetrain.version> </properties>************************************* 阅读全文
posted @ 2018-05-29 16:27 jentary 阅读(204) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示