![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
Jamin_Ye
最好不相见,如此便可不相恋。最好不相知,如此便可不相思。
展开
-
springboot非web项目启动
一直挂着@SpringBootApplicationpublic class XxlJobDemoApplication { public static void main(String[] args) throws InterruptedException { SpringApplication.run(XxlJobDemoApplication.class, args); //让程序不结束 new CountDownLatch(1).await(); }}实现Applicat.原创 2021-07-05 06:53:09 · 429 阅读 · 0 评论 -
springboot静态资源添加版本号控制版本更新
解决方法spring.resources.chain.strategy.fixed.enabled=truespring.resources.chain.strategy.fixed.paths=/**spring.resources.chain.strategy.fixed.version=@project.version@验证结果参考文档1. Springboot2 thymeleaf 静态资源加版本号控制缓存更新...原创 2021-06-19 21:21:14 · 623 阅读 · 0 评论 -
@RequestParam使用defaultValue属性设置默认值
@RequestParam使用defaultValue属性设置默认值注意设置必须是string类型的,框架自己会做转换参考@RequestParam使用defaultValue属性设置默认值原创 2021-06-19 21:20:11 · 2279 阅读 · 0 评论 -
idea配置多环境打包
4个配置文件src/main/resource/application.propertiessrc/main/resource/application-dev.propertiessrc/main/resource/application-release.propertiessrc/main/resource/application-test.properties配置pom.xml<profiles> <profile> .原创 2021-05-23 00:08:08 · 816 阅读 · 0 评论 -
springBoot配置双数据源
spring.datasource.primary.jdbc-url=jdbc:mysql://localhost:3306/compstore2?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghaispring.datasource.primary.username=rootspring.datasource.primary.password=123456#第二个数据原创 2021-02-03 23:33:22 · 174 阅读 · 0 评论 -
springboot设置文件上传限制
参考springboot最大上传文件配置package com.ustcinfo.fn.config;import org.springframework.beans.factory.annotation.Value;import org.springframework.boot.web.servlet.MultipartConfigFactory;import org.springframework.context.annotation.Bean;import org.springframew原创 2020-11-15 15:14:42 · 1427 阅读 · 0 评论 -
全局参数去除空格
package com.ustcinfo.fn.config;import org.springframework.beans.propertyeditors.CustomDateEditor;import org.springframework.beans.propertyeditors.StringTrimmerEditor;import org.springframework.web.bind.WebDataBinder;import org.springframework.web.bind原创 2020-11-07 13:08:30 · 381 阅读 · 0 评论 -
登陆拦截器
拦截器package com.ustcinfo.fn.config;import com.ustcinfo.fn.annotation.UnInterception;import com.ustcinfo.fn.sys.dto.tbmUser;import com.ustcinfo.fn.util.BaseUtil;import lombok.extern.slf4j.Slf4j;import org.springframework.web.method.HandlerMethod;impo原创 2020-11-07 13:06:38 · 108 阅读 · 0 评论 -
jdbcTemplate BaseDao
package com.ustcinfo.fn.util;import com.github.pagehelper.Page;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.jdbc.core.BeanPropertyRowMapper;import org.springframework.jdbc.c原创 2020-11-07 13:05:43 · 236 阅读 · 0 评论 -
单例中注入多例
单例中注入多例在配置多例对象时加入<aop:scoped-proxy/><bean id="excelListener" class="com.app.zrr.util.ExcelListener" scope="prototype"> <aop:scoped-proxy/> </bean>原创 2020-08-03 10:27:17 · 337 阅读 · 0 评论 -
SpringIOC源码流程图
Spring最重要的内容就是IOC和AOP,AOP在实际中用的比较少,但接触过Spring的人我相信都用过Spring的IOC,我们每天都在用的东西,到底底层原理是怎么样的,看源码跟着这张图你就能明白原创 2020-06-06 13:04:46 · 385 阅读 · 0 评论 -
springmvc上传下载
上传参考导包 <!--springmvc 上传--> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <vers...原创 2019-03-31 15:42:39 · 61 阅读 · 0 评论 -
Spring入门
SpringSpring下载IOCConstruct Injection 依赖注入AOPSpring中的事务下载下载Spring包:spring下载导包:spring-beans-4.1.0.RELEASE.jarspring-context-4.1.0.RELEASE.jarspring-core-4.1.0.RELEASE.jarspring-expre...原创 2019-03-31 11:49:48 · 113 阅读 · 0 评论 -
Spring mvc入门
SpringMVC文章目录SpringMVC快速入门获取数据输出数据springmvc请求原理快速入门jar包commons-logging-1.1.3.jarspring-aop-4.0.0.RELEASE.jarspring-beans-4.0.0.RELEASE.jarspring-context-4.0.0.RELEASE.jarspring-core-4.0.0.RE...原创 2019-03-31 10:40:29 · 127 阅读 · 2 评论