java
魏MJ
1111
展开
-
Spring MVC 配置文件dispatcher-servlet.xml 文件详解(转自 学无止境-yj)
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http:/转载 2018-06-14 10:27:13 · 2192 阅读 · 0 评论 -
IDEA工程文件目录标注
Sources 一般用于标注类似 src 这种可编译目录。有时候我们不单单项目的 src 目录要可编译,还有其他一些特别的目录也许我们也要作为可编译的目录,就需要对该目录进行此标注。只有 Sources 这种可编译目录才可以新建 Java 类和包,这一点需要牢记。Tests 一般用于标注可编译的单元测试目录。在规范的 maven 项目结构中,顶级目录是 src,maven 的 src 我们是不会设...原创 2018-06-14 10:29:11 · 2302 阅读 · 0 评论 -
Java线程机制
新建( new ):新创建了一个线程对象。可运行( runnable ):线程对象创建后,其他线程(比如 main 线程)调用了该对象 的 start ()方法。该状态的线程位于可运行线程池中,等待被线程调度选中,获 取 cpu 的使用权 。运行( running ):可运行状态( runnable )的线程获得了 cpu 时间片( timeslice ) ,执行程序代码。阻塞( block ):...转载 2018-06-14 10:30:02 · 102 阅读 · 0 评论 -
Java遍历Map对象
Map作为我们常用的容器,在学习和工作中用的很多,下面介绍几种遍历Map集合对象的方法,供大家参考第一种,在for-each循环中,使用Entry对象遍历Map中的每一个键值对,这个方法比较常用,但是for-each在java1.5之后引入,所以需要高于1.5的版本才可以使用,另外,对于为空的Map进行foe-each遍历会抛出空指针异常,需要注意Map是否为空第二种,和第一种类似,也是for-e...原创 2018-06-14 10:30:49 · 768 阅读 · 0 评论 -
Result Maps collection does not contain value for java.lang.Integer解决方法
在使用springboot搭建的SSM项目中,遇到了Result Maps collection does not contain value for java.lang.Integer解决方法的报错原因是mybatis的配置文件中的类型错误比如我的错误就是parameterType写成了parameterMap,导致无法识别参数的类型,因此出错,记录下来!...原创 2018-06-14 10:31:33 · 2217 阅读 · 0 评论 -
Establishing SSL connection without server's identity verification is not recommended.
WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default i...原创 2018-06-14 10:32:12 · 651 阅读 · 0 评论 -
springboot创建项目后运行报错
Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver classAction:Consider the fol...原创 2018-06-14 10:32:42 · 1583 阅读 · 2 评论 -
SpringBoot2.0集成Mybatis(简单配置druid及pagehelper)
SpringBoot是目前比较火的一款web应用开发的解决方案,详细的介绍可以浏览Spring boot官网https://spring.io/projects/spring-boot总的来说,它是一款约定大于配置的框架,集成了历来Spring的优秀产品,也可以和很多开源框架完美集成。本人也是刚刚接触Spring Boot,几个月前使用Spring boot集成Mybatis完成了毕业设计的APP...原创 2018-06-19 14:52:08 · 4103 阅读 · 0 评论 -
SpringBoot2.0使用pagehelper进行分页查询
SpringBoot2.0使用pagehelperjin进行分页查询pagehelper是一款分页插件,可以很好地集成在SpringBoot框架中,简单配置,轻松使用 在使用pagehelper这个插件进行分页之前,我们需要先集成一款持久层框架,我这里继承了mybatis,如果有需要,可以看我之前的博客,了解一下如何集成mybatis持久层框架以及配置Druid数据源。 SpringB...原创 2018-07-10 15:36:12 · 18266 阅读 · 5 评论