当前位置: 首页 > news >正文

公司网站标题优化立码软件做网站

公司网站标题优化,立码软件做网站,如何查做的网站排名,上海外贸进出口公司重构测试项目为springspringMVCMybatis框架 背景 继上次将自动化测试时的医药管理信息系统项目用idea运行成功后#xff0c;由于项目结构有些乱#xff0c;一部分代码好像也重复#xff0c;于是打算重新重构以下该项目#xff0c;这次先使用springspringMVCMybatis框架 …重构测试项目为springspringMVCMybatis框架 背景 继上次将自动化测试时的医药管理信息系统项目用idea运行成功后由于项目结构有些乱一部分代码好像也重复于是打算重新重构以下该项目这次先使用springspringMVCMybatis框架 一、设计项目目录结构 按ssm框架重新设计了目录结构删除了一些重复代码 ├─.idea ├─src │ └─main │ ├─java │ │ └─mms │ │ ├─controller │ │ ├─interceptors │ │ ├─mapper │ │ ├─pojo │ │ └─services │ ├─resources │ │ ├─mybatis │ │ │ ├─mybatis-config.xml │ │ │ └─mappers │ │ ├─spring │ │ │ ├─applicationContext.xml │ │ │ ├─applicationContext-mybatis.xml │ │ │ └─springMVCConfig.xml │ │ ├─jdbc.properties │ │ ├─log4j.properties │ │ └─static │ │ ├─css │ │ ├─images │ │ ├─js │ │ └─myjavascript │ └─webapp │ └─WEB-INF │ └─templates │ ├─agency │ ├─client │ └─medicine └─target 同时也修改了文件名tabs–templates如果你也修改了记得将对应的代码也进行修改 二、将war包中的class 由于老师给的是项目打包后的war包代码都是.class文件我们需要使用工具JD-GUI将.class文件转换为.java文件转换后将.java文件放入对应的包下。 三、修改配置文件springMVCConfig.xml并添加控制器 由于资源文件位置发生了改变重启项目后会出现资源访问404的错误我们需要对相关的配置文件springMVCConfig.xml进行修改添加静态资源映射调整视图解析器配置和访问请求配置 ?xml version1.0 encodingUTF-8? beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xmlns:phttp://www.springframework.org/schema/pxmlns:contexthttp://www.springframework.org/schema/contextxmlns:mvchttp://www.springframework.org/schema/mvcxsi:schemaLocationhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd!-- 注解驱动 --mvc:annotation-driven /!-- 定义Controller的扫描包 --context:component-scan base-packagemms.controller /!-- 定义静态资源映射 --mvc:resources mapping/static/** locationclasspath:/static/ /!-- 定义视图解析器 --beanclassorg.springframework.web.servlet.view.InternalResourceViewResolverproperty nameprefix value/WEB-INF/templates/ /property namesuffix value.html //bean!-- 处理静态资源被“/”所拦截的问题 --mvc:default-servlet-handler /!-- 定义拦截器 --mvc:interceptorsmvc:interceptor!-- 所有的请求都进入 --mvc:mapping path/**/!-- 不拦截登陆页面 --mvc:exclude-mapping path/login.html /mvc:exclude-mapping path/static/css/* /mvc:exclude-mapping path/static/js/** /mvc:exclude-mapping path/static/images/* /!-- 不拦截处理登陆的业务 --mvc:exclude-mapping path/Login/loginUser /bean classmms.interceptors.MyHandlerInterceptor//mvc:interceptor/mvc:interceptors/beans由于之前的html文件都是直接暴露在根目录下的静态资源因此可以直接通过 URL 访问。而现在我们将html文件移动到 WEB-INF 目录下需要视图解析器通过控制器返回视图名去访问因此我们还需要添加控制器IndexController package mms.controller;import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping;/*** author Orange peel* create 2025-02-16 19:08*/ Controller public class IndexController {RequestMapping(/index)public String showIndex() {return index; // 返回的视图名称}RequestMapping(/templates/client/Search)public String clientSearch() {return client/Search;}RequestMapping(/templates/agency/Search)public String agencySearch() {return agency/Search;}RequestMapping(/templates/medicine/Search)public String medicineSearch() {return medicine/Search;}RequestMapping(/templates/client/Entry)public String clientEntry() {return client/Entry;}RequestMapping(/templates/agency/Entry)public String agencyEntry() {return agency/Entry;}RequestMapping(/templates/medicine/Entry)public String medicineEntry() {return medicine/Entry;}RequestMapping(/templates/client/Delete)public String clientDelete() {return client/Delete;}RequestMapping(/templates/agency/Delete)public String agencyDelete() {return agency/Delete;}RequestMapping(/templates/medicine/Delete)public String medicineDelete() {return medicine/Delete;}RequestMapping(/templates/client/Modify)public String clientModify() {return client/Modify;}RequestMapping(/templates/agency/Modify)public String agencyModify() {return agency/Modify;}RequestMapping(/templates/medicine/Modify)public String medicineModify() {return medicine/Modify;}RequestMapping(/templates/client/Browse)public String clientBrowse() {return client/Browse;}RequestMapping(/templates/agency/Browse)public String agencyBrowse() {return agency/Browse;}RequestMapping(/templates/medicine/Browse)public String medicineBrowse() {return medicine/Browse;}RequestMapping(/templates/client/Report)public String clientReport() {return client/Report;}RequestMapping(/templates/agency/Report)public String agencyReport() {return agency/Report;}RequestMapping(/templates/medicine/Report)public String medicineReport() {return medicine/Report;}RequestMapping(/templates/User)public String User() {return User;} } 四、配置tomcat后直接启动即可 等下次有空再重构成springboot项目加纳~
http://www.hkea.cn/news/14545557/

相关文章:

  • 郑州网站排名优化外包网站建设推广seo
  • 做影视网站 片源从哪里来做网上竞猜网站合法吗
  • 济南优化网站基层建设 网站
  • 网站开发工程师职责怎样给网站做关键词优化
  • 哈尔滨关键词优化排行企业seo顾问
  • 强企网做网站中国建筑是国企还是央企
  • 南海网站建设公司com域名是哪个国家的
  • 百度商桥怎样绑定网站wordpress the_terms
  • 有没有让人做问卷的网站广东石油化工建设集团公司网站
  • 程序员开源网站荆州seo技术厂家
  • 天眼查网站建设公司韶关住房和城乡建设局网站
  • 自己做响应式网站难吗为什么做电影网站没有流量
  • 企业网站 单页织梦手机网站制作
  • 网站开发台州重庆顶呱呱网站建设
  • 动易网站地图盈利网站
  • 安徽经工建设集团网站中国建筑企业
  • 做企业网站怎么样电商如何推广产品
  • 网站建设与管理管理课程新媒体是什么
  • 宿迁网站建设排名wordpress 微博 主题
  • 宿迁网站建设怎么收费教育类网站开发公司
  • 网站开发都有哪些新手小白如何互联网创业
  • 贵州省建设银行招聘网站免费的黄冈网站有哪些平台可以用微信支付
  • 做网站在阿里云上面买哪个服务常州专业做网站公司
  • 怎么建免费论坛网站iis网站跳转
  • 丽江古城区建设局网站WordPress长文章索引插件
  • 网站由哪些部分组成互联网内容服务商
  • 类似淘宝的网站怎么做的深圳百度seo优化
  • 电子商务网站设计规划书网站建设以及seo
  • 禅城区企业网站建设百度问答入口
  • 北京平台网站建设价格商丘整站优化