![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
祁_z
这个作者很懒,什么都没留下…
展开
-
spring-boot-starter自动装配流程总结
spring-boot-starter自动装配流程总结:@SpringBootApplication注解是否组合注解,包含了@EnableAutoConfiguration,@EnableAutoConfiguration又包含了AutoConfigurationImportSelector.class自动配置导入选择器,首先这个class扫描与启动类同一包下的组件外,还会去jar包中是否存在META-INF/spring.factories文件,然后从spring.factories中加载需要自动配.原创 2020-05-29 16:19:26 · 578 阅读 · 0 评论 -
vue打包整合到springboot中
1.修改vuejs的config/index.js,在里面找到assetsPublicPath,改为/,记住,是build:{}这里的,不是上面dev:{}的build: { // Template for index.html index: path.resolve(__dirname, '../dist/index.html'), // Paths as...原创 2020-04-25 10:35:57 · 7842 阅读 · 0 评论 -
SpringBoot网关gateway整合swagger
maven依赖<dependency> <groupId>com.spring4all</groupId> <artifactId>swagger-spring-boot-starter</artifactId> <version>1.7.0.RELEASE</version><...原创 2020-07-04 14:00:10 · 2362 阅读 · 0 评论 -
springboot2.0源码 V1
目录启动函数源码解析第一步SpringApplication构造函数源码:第二步run方法源码:解析@EnableAutoConfigurationspringboot如何加载tomcatspringboot如何加载加载springmvc启动函数SpringApplication.run(Application.class,args);等于...原创 2019-10-15 11:06:12 · 315 阅读 · 0 评论 -
Thymeleaf模版引擎代替jsp
1. pom<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency>...转载 2019-02-21 14:50:18 · 891 阅读 · 0 评论 -
thymeleaf模版语法
thymeleaf模版语法和其他模版引擎模版语法蛮相似,都有循环、判断、表达式、日期处理等等条件判断 :https://www.cnblogs.com/acm-bingzi/p/thymeleafJudge.html一:访问map中的数据 1 2 3 4 5 6 7 8 9 10 ...转载 2019-02-21 14:55:44 · 358 阅读 · 0 评论 -
2. springboot项目加载linux中的图片 (使用springboot方式配置) 或 (利用tomcat虚拟目录) (可用)
第一种方式linux环境也可以使用这种配置然后通过http://127.0.0.1:8080/图片名 即可访问到图片第二种方式1. springboot项目端口 8080 ( linux80端口 指向 8080, 直接ip就可访问项目 )2. linux上的tomcat端口 8081 , 设置server.xml配置虚拟目录 jia 指向 /us...原创 2018-06-09 17:22:27 · 2441 阅读 · 1 评论 -
springboot项目配置application添加图片映射 (windows and linux 都可使用)
配置application.propertieslinux环境也可以使用这种配置然后通过http://127.0.0.1:8080/图片名 即可访问到图片# 保存路径save.pic=C:/java/prc/# 获取路径get.pic=http://${ip}:${server.port}/#设置访问静态资源spring.resources.chai...原创 2019-03-01 14:36:15 · 839 阅读 · 0 评论 -
SpringBoot整合Swagger2 _v1
目录(一)手写Api文档的几个痛点:(二):springboot整合Swagger一:pom依赖二、Swagger配置类三:在引导类中开启swagger四:项目中使用五:Restful 接口文档五、查看Swagger2文档六、Swagger注解说明七:完整代码https://www.cnblogs.com/jtlgb/p/8532433.html...原创 2019-03-08 11:27:05 · 171 阅读 · 0 评论 -
springboot配置拦截器 - session过期跳至登录页
第一步: 创建拦截器/** * 定义拦截器 */@Component@Log4jpublic class ConfigInterceptor implements HandlerInterceptor{ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse r...原创 2019-05-17 17:24:56 · 16801 阅读 · 20 评论 -
springboot项目session共享(redis)
1. 启动类加上注解:@EnableRedisHttpSession2. pom文件 <!-- 集成redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifac...原创 2018-06-26 14:43:15 · 408 阅读 · 0 评论 -
springboot2.0以上配置session过期
application.properties配置方式#配置session无操作1800秒(30分钟)后过期server.servlet.session.timeout=1800sapplication.yml配置方式server: servlet: session: timeout: 1800s...原创 2019-06-11 17:06:01 · 2786 阅读 · 0 评论 -
springboot整合freemarker
https://www.cnblogs.com/xingyunblog/p/8746542.htmlpom<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freem...转载 2019-09-04 11:59:57 · 156 阅读 · 0 评论 -
Spring Boot之配置虚拟映射路径 (文件保存/显示)
需要先在application.properties属性文件中配置本地上传文件的路径:spring.http.multipart.location=D:/crowd-funding/media/然后将本地上传文件的路径加入到静态资源路径中即可:spring.resources.static-locations=classpath:/META-INF/resources/,c...转载 2019-07-25 16:19:35 · 210 阅读 · 0 评论