10 2018 档案
摘要:Mybatis + Mysql 插入数据时中文乱码问题 MySQL- 5..7.24-winx64 安装详解
阅读全文
摘要:1.web.xml配置如下 关键是41-52行 2.控制器controller 要有对应的 @RequestMapping("/index") 即可. 3.如何直接通过域名访问 如果要发布到服务器,不带项目名访问,把项目打包成ROOT.war,放到webapps下即可. ROOT里面直接是资源文件和
阅读全文
摘要:1.Mybatis-Generator下载 地址:https://github.com/mybatis/generator/releases 我使用的是 mybatis-generator-core-1.3.7 2.配置generatorConfig.xml 官网: http://www.mybat
阅读全文
摘要:1.引入依赖 2.在springmvc-config.xml增加mybatis配置 3.在classpath:mapper/ 创建CustomerMapper.xml 注意创建的位置,是在上面设置的 mapperLocations. 4.创建CustomerMapper.xml对应的Customer
阅读全文
摘要:核心是让SessionFactory由Spring管理 1.引入依赖 2.配置 springmvc-config.xml 重点是 dataSource和sessionFactory. 3.建立 *.hbm.xml和实体类Customer mapping:Customer.hbm.xml,model:
阅读全文
摘要:前提:已搭建好环境 1.建立Controller 访问后报错,如下 Type Exception ReportMessage No converter found for return value of type: class com.ice.model.PersonDescription The
阅读全文
摘要:1.建立project / module 新建空的project:springMvcStudy 新建module:type maven-webapp,名字mvcStudy 2.为module设置Sources和Resources 在mvcStudy/src/main下新建2个文件夹:java,res
阅读全文