
spring boot
漩涡中的蚂蚁
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
logback log.info() 输出的对象没有父类的属性
解决方式:log.info 输出的对象中并没有父类的属性。用的是logback,已然用了@Data 注释,并且也设置了@ToString (callSuper=true)来设置。也没有打印出来父类的属性参数。是不是需要在父类中也添加同样的注解?是的,也不是,父类中值需要添加@Data 注释就可以了,不需要其他的...原创 2020-01-19 20:48:54 · 2733 阅读 · 0 评论 -
springboot + logback + tomcat 外置tomcat,不能生成日志保存路径
在使用springboot配置logback日志框架。我直接用 springboot 的内置tomcat,此时的logback配置起了作用。并且能正确的生成日志。但是,把项目打包发布到外置tomcat中的时候,并没有读取配置。(此时单项目,我见了其他人的文章发现他们的多项目的时候会出现问题,需要每个项目中都导入lomback的依赖)。此时,毫无头绪了。上述说的没有读取配置是因为马后炮解决...原创 2020-01-18 19:29:47 · 2598 阅读 · 0 评论 -
springboot + shiro 设置session过期时间
在springboot + shiro中,可以设置session过期时间。有两种方式:在application.yml 中设置过期时间,但是在使用外部tomcat的时候不起作用。 server: connection-timeout: servlet: session: timeout: 在这里,设置了两座过期时间,您试一下,可能我这里是哪里不对。 ...原创 2019-12-19 17:10:45 · 3416 阅读 · 2 评论 -
springboot 自定义Interceptor
当我们想要在springboot中自定义一个Intercepter拦截器来拦截某些请求。1.定义一个拦截器package com.mindbook.spring_boot_user_auth.interceptor;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.s...原创 2019-12-15 11:46:12 · 506 阅读 · 0 评论 -
springboot + ueditor + 上传的文件存放到其他磁盘目录中
在使用springboot + ueditor中的时候,我需要把图片放到非tomcat发布项目的目录中。我自定义了一个UeditorActionEnter:import com.baidu.ueditor.ActionEnter;import com.baidu.ueditor.ConfigManager;import com.baidu.ueditor.define.Actio...原创 2019-12-12 14:25:07 · 461 阅读 · 0 评论 -
springboot + ueditor 自定义上传路径
当你看到这篇文章的时候,您需要考虑一下上传的场景。我用的是springboot 集成ueditor 并且使用的是百度的包,进行的上传。默认的是你已经部署好springboot+ ueditor的简单应用后,不能上传文件。自定义controller用来接收前端初始化ueditor与上传文件的时候的访问接口(初始化与上传访问的是同一个接口) /** * 初始化ueditor的配置Co...原创 2019-12-12 14:16:11 · 545 阅读 · 0 评论 -
springboot + ueditor 自定义上传路径注意事项
当您简单的富文本编辑器集成成功后,您需要对接上传功能。前端会提示您 未正确配置上传功能的错误提示。我遇到过几种如下:请求上传路径错误(这个是默认是用controller.jsp进行图片上传):因为我把ueditor的所有文件放到了springboot的static文件夹下,访问被拒绝。 配置文件初始化失败:这个是你在加载ueditor的时候会进行访问你的上传接口,初次访问返回的是json字符...原创 2019-12-12 12:50:52 · 1556 阅读 · 0 评论 -
springboot + ueditor 的使用
场景:在springboot中 使用百度的ueditor富文本编辑器。现在把他们集成。但是限制于springboot的一些特殊情况跟以前的集成并不相同了。这几天也看了一些他人的文章,做了一下,最终形成了一个正确的能运行的集成结果。在springboot中使用的步骤:简单集成(上传功能不能用:比如上传图片,上传视频等等):layui+ueditor这个是使用layui的,您前端不是使用的此...原创 2019-12-12 12:11:18 · 288 阅读 · 0 评论 -
org.springframework.core.type.AnnotationMetadata.introspect(Ljava/lang/Class;)Lorg/springframework/c
使用tomacat发布的时候一开始还没有这个问题。不知道什么时候就突然出现这个问题了。全部的描述是这样的:Description:An attempt was made to call a method that does not exist. The attempt was made from the following location: org.springframe...原创 2019-11-24 10:06:01 · 7959 阅读 · 0 评论 -
spirngboot 在controller中配置了跳转,但是提示404错误,那么你很可能没有添加解析页面的模板引擎
spirngboot 在controller中配置了跳转,但是提示404错误。可能没有添加Thymeleaf 或者是framemaker 模板引擎原创 2019-11-16 15:05:50 · 828 阅读 · 1 评论 -
idea 中使用热部署devtools
idea 有个好麻烦的问题,修改页面中的数据需要重新启动。反复启动真的很麻烦。所以就有了热部署。我第一次用就感觉热部署其实也挺麻烦的。相较之下,我就放弃了热部署。总感觉用了热部署电脑就卡了。4G的内存。不知道其他人有没有这样的感觉。记录一下错误的问题:springboot支持的热部署:devtools加载依赖 <!--Spring 官方提供的热部署插件 --> ...原创 2019-11-13 15:10:24 · 156 阅读 · 0 评论 -
inspects a maven model for resolution problems
在pom.xml文件中,添加dependency的引入各种文件包。出现错误提示: inspects a maven model for resolution problems 或者提示加载的jar包不存在解决方式:在pom.xml 中,右击 --maven -- download 添加就好 但是上述添加还是下载不到本地,那么就点击reImport maven project...原创 2018-10-23 11:57:45 · 1432 阅读 · 0 评论 -
There was an unexpected error (type=Not Found, status=404).
springboot 使用thymeleaf模板来展示界面出现问题:Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Fri Oct 26 17:41:56 CST 2018There was an unexpe...原创 2018-10-26 17:51:33 · 3518 阅读 · 0 评论 -
spring security HttpSecurity 的方法
使用spring security 进行对用户进行管理。基于这样的情况,我们省却了很大的时间成本来进行用户权限的处理。使用spring security,那么,我们需要对默认的配置进行重写。创建自己的spring security 的类,继承 WebSecurityConfigurerAdapter 并且实现他的config方法。既然实现他的方法,总的不能缺少HttpSecurity 的方法介...转载 2018-11-08 12:37:05 · 1504 阅读 · 0 评论 -
springboot + thymeleaf 错误
在使用springboot + thymeleaf的时候有些问题。记录一下1.springboot 引入thymeleaf的依赖。引入spring-boot-starter-thymeleaf。这里最好刷新一下maven projects,引入thymele的依赖,pom中引入不报错了,但是,这里边没有显示引入的话,也是不行的,出现问题是:(我直接把界面拷贝过来了)Whitelabel E...原创 2018-11-19 12:03:16 · 384 阅读 · 0 评论 -
ApplicationContextException: Unable to start ServletWebServerApplication (springboot)
springboot 中,启动报错:如标题。因为没有容器的缘故。springboot有两种tomcat发布的方式;内置tomcat,在pom.xml中配置spring-data-stater-tomcat的依赖就可以了 外置tomcat,这个需要按照tomcat的外置方式来配置。选择相应的启动方式就可以了...原创 2019-03-06 12:47:30 · 4624 阅读 · 0 评论 -
shiro + springboot的集成错误
org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is a...原创 2019-03-06 16:50:31 · 177 阅读 · 0 评论 -
springboot项目启动到一半就停止了,不再执行下去
这种情况我遇到的不多,但是就是配置文件的问题。一次是配置springboot发布到外部tomcat上,另一次是文件莫名的回归初始化(我的启动文件,突然就变成最初的样子了,还有次是application.yml,这个是从application.properties修改过来的。突然的就变成了两个文件,当然最初的是空的。)额,我说点什么,直接就记录完成了。没一点格式的样子。...原创 2019-03-11 11:24:36 · 7530 阅读 · 0 评论 -
程序正常启动,但是就是不能进入第一个页面。404
本来用的好好的啊,为什么进入不进去呢?我这个不是工作的电脑,我回家用的自己的电脑。东西都是拷贝下来的,然后重新配置的,这个是个很简单的问题,在配置tomcat的时候,我并没有配置Deployment 下边的|Application Context。这个就是你的项目名字,当然也可以随便的写。...原创 2019-03-11 11:28:48 · 492 阅读 · 0 评论 -
idea 使用外部tomcat的时候,启动了两次怎么解决
如题,我们碰到了这么个情况。怎么解决?分情况了。我记得两种情况,忘记了第三种了。我也不做最简单的介绍了。只说我这种情况没有说到的。当我们用外部tomcat发布的时候,我发现,设置的本地图片访问被拒绝。也就是说tomcat其实不是全部启动的。只是运用于idea中的tomcat的项目访问。好吧,我要判断一下图片是否可用。经网上搜索发现,在配置tomcat的页面tomcat server setti...原创 2019-04-21 11:16:45 · 2729 阅读 · 0 评论 -
git Cannot resolve symbol XXX
出现了这个问题,有人写的很详细,我也就不再赘述了。我记得以前我也遇到过,不过时很快就解决了。这次也不知道是为什么卡到这儿了。看他们的解决方式三种。我再说一种。那就是你那的网不行。建议更换较好的网络。...原创 2019-04-23 22:50:06 · 514 阅读 · 0 评论 -
springboot 内置tomcat的端口号修改为80
springboot 内置tomcat端口号为80,只需要修改properties.yml 中的server.port 为80 就OK了原创 2019-05-07 08:28:27 · 3414 阅读 · 0 评论 -
springboot 在application.yml(.propertities)中自定义属性
引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional&...原创 2019-05-10 08:45:51 · 754 阅读 · 0 评论 -
简单的spring boot 发布到tomcat 下
spring boot 发布到tomcat服务器上步骤:(jar包不说,直说war包) packaging 标签,里边 修改为war(默认为jar) denpendency标签添加: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>s...原创 2018-10-21 14:32:04 · 174 阅读 · 0 评论