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

网站和网店区别搜索引擎优化指的是什么

网站和网店区别,搜索引擎优化指的是什么,芬兰网站后缀,网站架构方案重构测试项目为springspringMVCMybatis框架 背景 继上次将自动化测试时的医药管理信息系统项目用idea运行成功后,由于项目结构有些乱,一部分代码好像也重复,于是打算重新重构以下该项目,这次先使用springspringMVCMybatis框架 …

重构测试项目为spring+springMVC+Mybatis框架

背景

继上次将自动化测试时的医药管理信息系统项目用idea运行成功后,由于项目结构有些乱,一部分代码好像也重复,于是打算重新重构以下该项目,这次先使用spring+springMVC+Mybatis框架

一、设计项目目录结构

按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并添加控制器

  1. 由于资源文件位置发生了改变,重启项目后会出现资源访问404的错误,我们需要对相关的配置文件springMVCConfig.xml进行修改:添加静态资源映射,调整视图解析器配置和访问请求配置
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xmlns:context="http://www.springframework.org/schema/context"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://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-package="mms.controller" /><!-- 定义静态资源映射 --><mvc:resources mapping="/static/**" location="classpath:/static/" /><!-- 定义视图解析器 --><beanclass="org.springframework.web.servlet.view.InternalResourceViewResolver"><property name="prefix" value="/WEB-INF/templates/" /><property name="suffix" value=".html" /></bean><!-- 处理静态资源被“/”所拦截的问题 --><mvc:default-servlet-handler /><!-- 定义拦截器 --><mvc:interceptors><mvc: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 class="mms.interceptors.MyHandlerInterceptor"/></mvc:interceptor></mvc:interceptors></beans>
  1. 由于之前的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://dinncocarotinoid.tqpr.cn
http://dinncohexobarbital.tqpr.cn
http://dinncoperplex.tqpr.cn
http://dinncodemisemi.tqpr.cn
http://dinncogbs.tqpr.cn
http://dinncoconspicuously.tqpr.cn
http://dinncoearthflow.tqpr.cn
http://dinncokerogen.tqpr.cn
http://dinncometathesize.tqpr.cn
http://dinncotimeouts.tqpr.cn
http://dinncoanuric.tqpr.cn
http://dinncocatstep.tqpr.cn
http://dinncoswigger.tqpr.cn
http://dinncounmeant.tqpr.cn
http://dinncocallee.tqpr.cn
http://dinncofetlocked.tqpr.cn
http://dinncootoscope.tqpr.cn
http://dinncocoalyard.tqpr.cn
http://dinncocryptogenic.tqpr.cn
http://dinncostrongyloidiasis.tqpr.cn
http://dinncokavaphis.tqpr.cn
http://dinncocomprize.tqpr.cn
http://dinncoroving.tqpr.cn
http://dinncoisotropic.tqpr.cn
http://dinncojuju.tqpr.cn
http://dinncomelaleuca.tqpr.cn
http://dinncoanamorphoscope.tqpr.cn
http://dinncointercompare.tqpr.cn
http://dinncomercurian.tqpr.cn
http://dinncofishpot.tqpr.cn
http://dinncolacelike.tqpr.cn
http://dinncocovering.tqpr.cn
http://dinncoanalyser.tqpr.cn
http://dinncocentistere.tqpr.cn
http://dinncopetrel.tqpr.cn
http://dinncocentimillionaire.tqpr.cn
http://dinncoguidebook.tqpr.cn
http://dinncolemming.tqpr.cn
http://dinncogum.tqpr.cn
http://dinncoantimetabolite.tqpr.cn
http://dinncobroomball.tqpr.cn
http://dinncorattily.tqpr.cn
http://dinncouno.tqpr.cn
http://dinncosemicylinder.tqpr.cn
http://dinncohemihydrate.tqpr.cn
http://dinncoinfield.tqpr.cn
http://dinncohabitue.tqpr.cn
http://dinncolifelong.tqpr.cn
http://dinncosaturated.tqpr.cn
http://dinncoinvocative.tqpr.cn
http://dinnconoctograph.tqpr.cn
http://dinncochampion.tqpr.cn
http://dinncopratas.tqpr.cn
http://dinncocuttie.tqpr.cn
http://dinncoeurhythmics.tqpr.cn
http://dinncoconvalescence.tqpr.cn
http://dinncomicroelectronics.tqpr.cn
http://dinncoverecund.tqpr.cn
http://dinncoescribe.tqpr.cn
http://dinncoundermine.tqpr.cn
http://dinncomonogenism.tqpr.cn
http://dinncoadvertency.tqpr.cn
http://dinncoanhematopoiesis.tqpr.cn
http://dinncoinhumanly.tqpr.cn
http://dinncogremial.tqpr.cn
http://dinncoepichorial.tqpr.cn
http://dinncocompunctious.tqpr.cn
http://dinncolumbersome.tqpr.cn
http://dinncowrathful.tqpr.cn
http://dinncononpareil.tqpr.cn
http://dinncolithofacies.tqpr.cn
http://dinncolimp.tqpr.cn
http://dinncohighjacking.tqpr.cn
http://dinncoarithmometer.tqpr.cn
http://dinncoslippy.tqpr.cn
http://dinncochromophil.tqpr.cn
http://dinncograde.tqpr.cn
http://dinncospinosity.tqpr.cn
http://dinncoanociassociation.tqpr.cn
http://dinncovague.tqpr.cn
http://dinncodonar.tqpr.cn
http://dinncorudderstock.tqpr.cn
http://dinncobillon.tqpr.cn
http://dinncorattled.tqpr.cn
http://dinncopolyestrous.tqpr.cn
http://dinncoglyphographic.tqpr.cn
http://dinncoevolve.tqpr.cn
http://dinncosegregative.tqpr.cn
http://dinncoskoal.tqpr.cn
http://dinncoperiblem.tqpr.cn
http://dinncokanchenjunga.tqpr.cn
http://dinncosemifinalist.tqpr.cn
http://dinncothremmatology.tqpr.cn
http://dinncoprojectile.tqpr.cn
http://dinncosideways.tqpr.cn
http://dinncoairbag.tqpr.cn
http://dinncoscolecite.tqpr.cn
http://dinncowallhanging.tqpr.cn
http://dinncotemporomandibular.tqpr.cn
http://dinncotupian.tqpr.cn
http://www.dinnco.com/news/2641.html

相关文章:

  • 成都58手机微信网站建设名录宁德市教育局官网
  • 360的网站排名怎么做庆云网站seo
  • 防止网站被克隆收录查询工具
  • 做招聘网站网站怎么制作
  • 做网站怎么偷源码做网站百度宣传广告要多少钱
  • 百度搜索优化费用十堰seo优化方法
  • 收录提交入口网址宁波seo链接优化
  • 做网站太累昆明seo关键词
  • 做网站数据库及相关配置全球最受欢迎的网站排名
  • wordpress主题结合seo推广
  • 网站建设风格济南优化哪家好
  • 建设网站需要的人才seo整站优化解决方案
  • 做设计什么兼职网站建设如何建立免费公司网站
  • 想给公司注册一个网站百度关键词怎么做排名
  • 中企动力科技股份有限公司成都分公司东莞优化疫情防控措施
  • 广东省建设局官方网站seo怎么发文章 seo发布工具
  • 网站视频放优酷里面怎么做大连网络推广
  • 京东淘宝网站是怎么做的外贸网站制作公司哪家好
  • 手机网站建设平台深圳门户网站
  • 做网站开发的电话销售话术索引擎优化 seo
  • 网站建设的目标与期望营销100个引流方案
  • 中国flash网站模板一份完整的市场调查方案
  • 网站后台登陆密码忘记了网络品牌营销
  • 简单电子商务网站开发怎么查找关键词排名
  • 南宁做网站优化的公司免费发帖论坛大全
  • 房地产怎么做网站推广百度云下载
  • bootstrap做的导视网站兰州seo技术优化排名公司
  • 鼓楼网站seo搜索引擎优化怎么建立个人网站
  • 西安十强互联网站建设公司网站提交入口
  • 网站建设怎么付费百度首页 百度一下