springboot
兔老大的胡萝卜
这个作者很懒,什么都没留下…
展开
-
The valid characters are defined in RFC 7230 and RFC 3986 --springboot
特殊字符的原因解决方法:后台添加一个类@Componentpublic class ScTomcatWebServerCustomizer implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> { public ScTomcatWebServerCustomizer() { } @Override public void customize(TomcatServletWe原创 2021-04-01 16:32:45 · 119 阅读 · 0 评论 -
springboot各种格式转pdf
添加依赖<!--转pdf--> <dependency> <groupId>com.documents4j</groupId> <artifactId>documents4j-local</artifactId> <version>1.0.3</version> </dependency>原创 2021-01-04 15:55:48 · 2804 阅读 · 3 评论 -
java工具类(适用jdk1.8以上)依赖
<!--hutool工具包--> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>5.3.10</version> </dependency>原创 2020-08-06 10:04:39 · 943 阅读 · 0 评论 -
关于自定义cachemanager报错的问题
springboot1.x的cachemanager和2.x的不同,1.x @Bean public CacheManager cacheManager(@SuppressWarnings("rawtypes") RedisTemplate redisTemplate) { RedisCacheManager cacheManager = new RedisCacheManager(redisTemplate); //设置缓存过期时间 cacheM原创 2020-06-27 12:44:07 · 821 阅读 · 0 评论 -
springboot利用aop添加日志
日志的实体类@Datapublic class OperationLogPojo { private String id; private String optionName;//操作名字 private String userid;//操作者 private String optionType;//操作类型 private String operationTime;//操作时间 private String username;//操作者名字}获取原创 2020-06-22 22:28:42 · 283 阅读 · 0 评论 -
springboot项目做个拦截器
生成一个类@Componentpublic class UserLoginInterceptor implements HandlerInterceptor { protected org.slf4j.Logger logger = LoggerFactory.getLogger(getClass()); @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse resp原创 2020-06-22 16:00:31 · 152 阅读 · 0 评论 -
@RunWith(SpringJUnit4ClassRunner.class)报错
junit版本太低使用这个<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope></dependency>原创 2020-06-18 16:36:19 · 693 阅读 · 0 评论 -
Are you running in a Servlet container that supports JSR-356?
java.lang.IllegalArgumentException: No 'javax.websocket.server.ServerContainer' ServletContext attribute. Are you running in a Servlet container that supports JSR-356?将websocket的demo拉入自己的项目报错,其实显示的是...原创 2020-04-21 18:21:16 · 4702 阅读 · 5 评论 -
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definiti
springboot的错误Action:Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definiti原因:说是注入类的名字相同解决办法:spring: datasource: url: jdbc:oracle:thin:@192.16...原创 2020-04-16 17:19:02 · 503 阅读 · 0 评论 -
getString/getNString not implemented for class oracle.jdbc.driver.T4CBlobAcc
表里面应该是有一个blob的字段,实体类用string获取的,改成blob就行了原创 2020-04-10 15:35:51 · 4949 阅读 · 0 评论 -
springboot的错Invalid bound statement (not found)
一般都是xml映射错误看下自己的映射路径还有对应xml里面的namespace的对应路径如果都没错那就可能和我一下,创建xml文件时,没有给文件加上.xml后缀mybatis: mapper-locations: classpath:mapping/*Mapper.xml type-aliases-package: com.trueway.zhdwapp.user.entity....原创 2020-04-10 11:34:20 · 100 阅读 · 0 评论 -
springboot项目解决跨域问题
配置一个配置类@Configuration//配置解决跨域问题public class CrosConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") ...原创 2020-04-08 21:25:13 · 183 阅读 · 0 评论 -
springboot-boot配置yml连接本地oracle(之前老出错)
application.ymlserver: port: 8081 servlet: context-path: /spring: datasource: url: jdbc:oracle:thin:@127.0.0.1:1521:orcl username: haian3 password: 1 driver-class-name: ora...原创 2020-04-08 09:26:39 · 3476 阅读 · 0 评论