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

浙公网安备 33010602011771号