随笔分类 -  项目

摘要:Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.YEAR,3); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); Syste 阅读全文
posted @ 2020-08-19 14:26 辰梓悦 阅读(729) 评论(0) 推荐(0)
摘要:subjects = subjects.stream().collect( Collectors.collectingAndThen( Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(Subjects::getId)) 阅读全文
posted @ 2020-06-22 11:19 辰梓悦 阅读(2250) 评论(0) 推荐(0)
摘要:File directory = new File("src/main/resources/static/pic"); String courseFile = directory.getCanonicalPath(); System.out.println(courseFile); 资源映射 <re 阅读全文
posted @ 2020-05-13 15:13 辰梓悦 阅读(732) 评论(0) 推荐(0)
摘要:1.检查实体类是否有get和set方法 2.字段名是否写错 3.加上@Param注解 4.如果用的springboot整合mybatis 注意@Param注解的包 springboot的是 org.springframework.data.repository.query.Param; mybati 阅读全文
posted @ 2020-04-11 20:00 辰梓悦 阅读(127) 评论(0) 推荐(0)
摘要:一般是前后端分离 跨域了 拦截器添加代码 response.setHeader("Access-Control-Allow-Credentials","true"); @Component public class ComInterceptor extends HandlerInterceptorA 阅读全文
posted @ 2020-04-08 12:04 辰梓悦 阅读(785) 评论(0) 推荐(0)
摘要:添加@Optios注解 keyProperty 将自增的ID返回该属性 @Insert("INSERT INTO admin_method_category (title,sort,icon_type) VALUES(#{category.name},#{category.sort},#{categ 阅读全文
posted @ 2020-04-01 15:44 辰梓悦 阅读(1166) 评论(0) 推荐(1)
摘要:在不需要显示的字段上添加@JsonIgnore 注解即可 @ToString @Data public class User implements Serializable { private Integer id; private String loginId; @JsonIgnore priva 阅读全文
posted @ 2020-04-01 15:42 辰梓悦 阅读(3470) 评论(0) 推荐(0)
摘要:继承HandlerInterceptorAdapter方法 重写方法 @Component public class ComInterceptor extends HandlerInterceptorAdapter { @Autowired IUserDao userDao; @Autowired 阅读全文
posted @ 2020-03-31 11:55 辰梓悦 阅读(183) 评论(0) 推荐(0)
摘要:JOSN List 返回值为[ ] 要想让它不返回 在实体类添加注解 @JsonInclude(JsonInclude.Include.NON_EMPTY) public class MenuDTO { private Integer id; private String name; private 阅读全文
posted @ 2020-03-30 14:37 辰梓悦 阅读(2380) 评论(0) 推荐(0)
摘要:import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.cors.Cor 阅读全文
posted @ 2020-03-26 16:27 辰梓悦 阅读(167) 评论(0) 推荐(0)