踩坑
哈喽沃德!
这个人很懒,什么都没有留下……
展开
-
启动失败:Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
spring boot启动失败报错内容:Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.解决方法:加上依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web<原创 2021-07-10 21:24:09 · 196 阅读 · 0 评论 -
@Options注解和@Selectkey注解
@Options:useGeneratedKeys(是否是自增长,必须设置 true) 和 keyProperty(实体类主键属性名称) 、keyColumn(数据库主键字段名称)@Insert("insert into user (user_name,user_status) values (#{user.userName},#{user.userStatus})")@SelectKey(before = false, keyProperty = "user.userId", resultType =原创 2021-07-05 13:55:25 · 2166 阅读 · 0 评论 -
关于spring boot枚举类型的传参接收与比较
在实体类中定义的字段类型是枚举类型:@Datapublic class ProductDTO implements Serializable { private static final long serialVersionUID = 902365284986113117L; /**商品id*/ @NotNull(message = "商品id不能为空",groups = {Add.class}) private Integer productId; /**商原创 2021-07-03 18:23:41 · 1443 阅读 · 0 评论 -
list集合去重三种方法(代码示范)
package collection;import java.util.*;import java.util.stream.Collectors;/** * list去重 * @date 2021/6/9 15:49 */public class TestRemoveElement { public static void main(String[] args) { test(); } public static void test(){原创 2021-06-09 16:10:02 · 222 阅读 · 0 评论 -
java.lang.NoSuchMethodError: org.springframework.data.redis.repository.configuration.RedisRepository
springBoot使用redis测试类启动报错原创 2021-04-06 16:26:29 · 1382 阅读 · 0 评论