摘要: 检查引入路径 我用的这种,其中css文件夹和jsp文件同目录 <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+requ 阅读全文
posted @ 2020-03-15 21:27 搞点薯条 阅读(1139) 评论(0) 推荐(0) 编辑
摘要: 修改web.xml 将spring和springMVC配置文件一同加载 <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring-mvc.xml,classpath:applic 阅读全文
posted @ 2020-03-15 20:04 搞点薯条 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 建立controller层 UserController.java package com.imust.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind. 阅读全文
posted @ 2020-03-15 19:26 搞点薯条 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 整合配置文件 实质就是将mybatis的配置文件SqlSessionConfiguration.xml的配置信息整合到spring的核心配置文件applicationContext.xml中 applicationContext.xml <?xml version="1.0" encoding="U 阅读全文
posted @ 2020-03-15 17:37 搞点薯条 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 建立maven的web工程 项目结构如图,如有细微区别可自行建包然后Mark Directory as spring核心配置文件applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www 阅读全文
posted @ 2020-03-15 15:43 搞点薯条 阅读(362) 评论(0) 推荐(0) 编辑