springboot
编码的三叔
坚持是一种信仰。
展开
-
Springboot 不用web 而是写应用 application配置
主application 也是main方法所在的类package com.jackray.redis;import org.springframework.boot.SpringApplication;import org.springframework.boot.WebApplicationType;import org.springframework.boot.autoconfigu...原创 2020-03-30 15:43:50 · 1232 阅读 · 0 评论 -
spring boot拆分配置文件为 dev、pro、test
配置文件如下:active对应prodspring.profiles.active=prod#端口这是server.port=8089#日志路径logging.config=classpath:configs/prod/log4j2.xmlprod的配置文件spring.profiles.active=prod#端口server.port=8082#日志路径loggin...原创 2019-06-28 11:11:39 · 1473 阅读 · 0 评论 -
springboot整合shiro的session问题UnknownSessionException: There is no session with id
报错信息如下[2018-12-19 02:25:13.852][http-nio-8077-exec-8][DEBUG][org.apache.shiro.web.servlet.SimpleCookie][389]:Found 'SHRIOSESSIONID' cookie value [2387e612-1c34-44b5-b00f-faa2937e2c7f][2018-12-19 02:...原创 2018-12-19 02:45:51 · 7992 阅读 · 11 评论 -
spring boot报错SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/C:/Users/%e5%b0%98%e5%8a%ab%e7%a7%91%e6%8a%80/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic...原创 2018-12-11 13:13:42 · 1111 阅读 · 1 评论 -
Connected to the target VM, address: '127.0.0.1:58177', transport: 'socket'
网上查了一些资料说是testpackage com.ttxq.tt;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.boot.test.context.SpringBootTest;import org.springframework.test.context.junit...原创 2018-12-11 15:37:31 · 98367 阅读 · 1 评论 -
springboot连接数据库com.mysql.cj.exceptions.WrongArgumentException: Malformed database URL, failed to par
前端报错:Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Tue Dec 11 02:12:09 CST 2018There was an unexpected error (type=Internal Server...原创 2018-12-11 02:22:33 · 18295 阅读 · 2 评论 -
springboot生成的*mapper.xml id重复
原配置文件 <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名--> <table tableName="user" domainObjectName="UserDAO" enableCountByExample="原创 2018-12-11 01:45:19 · 1154 阅读 · 0 评论 -
springboot 启动报错 Error creating bean with name 'userDAOMapper' defined in file
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2018-12-11 00:57:00.093 ERROR 152276 --- [ main] o.s.boot.SpringApplication ...原创 2018-12-11 01:08:01 · 30549 阅读 · 12 评论 -
springboot2.1加载不到mapper的方法
前台报错Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Tue Dec 11 00:08:33 CST 2018There was an unexpected error (type=Internal Server ...原创 2018-12-11 00:10:51 · 1303 阅读 · 0 评论 -
idea springboot generator生成代码 8.XXX
pom <build> <plugins> <plugin> <groupId&am原创 2018-12-10 20:42:06 · 442 阅读 · 0 评论 -
Unable to load authentication plugin 'caching_sha2_password'
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project tt: Unable to load authentication plugin 'caching_sha2_password'. -> [Hel...原创 2018-12-10 20:29:59 · 1385 阅读 · 0 评论 -
spring boot generator生成代码 5.7mysql 而非8.XXX
pom.xml <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId&a原创 2018-12-10 19:27:08 · 344 阅读 · 0 评论 -
springboot整合log4j2
项目目录如下:pom特别注意,在由spring-boot的依赖中默认添加了日志,需要去掉之后log4j2才可以生效,否则包冲突。<exclusions> <exclusion> <groupId>org.s原创 2018-12-16 16:11:50 · 5067 阅读 · 0 评论 -
springboot整合mybatis
application.propertiesspring.datasource.type=com.alibaba.druid.pool.DruidDataSourcespring.datasource.url=jdbc:mysql://127.0.0.1:3306/xq?useUnicode=true&characterEncoding=UTF-8&useJDBCCompli...原创 2018-12-16 15:38:09 · 226 阅读 · 0 评论 -
Springboot用官方建议访问Html页面并接传值
pom<!--添加static和templates的依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-b原创 2018-12-26 22:04:40 · 1851 阅读 · 0 评论 -
spring大集合
spring原创 2018-12-10 13:50:10 · 130 阅读 · 0 评论 -
SpringBoot应用与原理之集成Log4j2
https://blog.csdn.net/HUXU981598436/article/details/79506537转载 2018-11-24 13:37:59 · 154 阅读 · 0 评论 -
SpringBoot---整合mybatis+generator自动生成代码+连接池+分页
如何整合Springboot和Mybatis框架,然后使用generator自动生成mapper,pojo等文件。然后再使用阿里巴巴提供的开源连接池druid,这个连接池的好处我就不说了,集合了所有连接池的好处,并且还提供了监控等功能,加大了可扩展性等等。idea 新建spring initializr 项目选择 sql 中的 mysql ,jdbc,mybatis参照地址...原创 2018-11-23 18:54:08 · 391 阅读 · 0 评论