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

重庆网站建设招聘竞价销售是什么意思

重庆网站建设招聘,竞价销售是什么意思,wordpress蛋糕主题,wordpress代码混乱一.Mvc: 1.概念: MVC它是一种设计理念。把程序按照指定的结构来划分: Model模型 、View视图 、Controller控制层; 结构图: 二.Springmvc: 1.概念: springmvc框架它是spring框架的一个分支。它是按照mvc架构思想设计…

一.Mvc:

1.概念:

MVC它是一种设计理念。把程序按照指定的结构来划分: Model模型 、View视图 、Controller控制层;

 结构图:

 二.Springmvc:

1.概念:

springmvc框架它是spring框架的一个分支。它是按照mvc架构思想设计的一款框架。。springmvc的主要作用: 接收浏览器的请求数据,对数据进行处理,然后返回页面进行显示.

2.为什么学springmvc?

 

 3.如何使用springmvc?⭐

准备工作:创建一个maven的web工程

 第一步:在创建好的maven的web工程中把依赖引入

  <dependencies>
    <!--springmvc依赖-->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>5.2.15.RELEASE</version>
    </dependency>
  </dependencies>

第二步:创建springmvc配置文件

<?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: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/context https://www.springframework.org/schema/context/spring-context.xsdhttp://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd"><!--第二步:springmvc的配置文件--><!--包扫描  扫描的是@Controller 和 @RequestMapping扫描范围:扫描指定的包和子包可以到com.zyl--><context:component-scan base-package="com.zyl.controller"/><!--开启注解驱动--><mvc:annotation-driven/><!--放行静态资源--><mvc:default-servlet-handler/><!--视图解析器--><bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!--前缀--><property name="prefix" value="/views/"/><!--后缀--><property name="suffix" value=".jsp"/></bean></beans>

 第三步:注册公共的servlet ---[DispatcherServlet](这里注意web.xml版本太低不行,需要替换掉之前的4.0版本。看着改)

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"version="4.0"><welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list>
<!--第四步: 注册公共的servlet-DispatcherServlet--><!--注册公共servlet-->
<servlet><servlet-name>spring01</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><!--加载 读取  spring 配置文件--><init-param><param-name>contextConfigLocation</param-name><param-value>classpath:spring01.xml</param-value></init-param>
</servlet><servlet-mapping><servlet-name>spring01</servlet-name><!--访问任何路径都要经过servlet--><url-pattern>/</url-pattern></servlet-mapping></web-app>

第四步:.编写controller类

基本完成搭建框架步骤!!!!

springmvc的流程:

 *     1. 客户端发生请求http://localhost:8080/hello/index
 *     2. 来到tomcat服务器。
 *     3. springmvc的前端控制器DipatcherServlet接受所有的请求。
 *     4. 查看你的请求地址和哪个@RequestMaping匹配。
 *     5. 执行对应的方法。方法会返回一个字符串。
 *     6. 把该字符串经过视图解析器拼接。 /前缀/字符串.后缀
 *     7. 拿到拼接的地址,找到对应的网页。 /views/hello.jsp
 *     8. 渲染该网页给客户

三、处理静态资源

静态资源就是网页中见到: js,css,image,html都是静态资源。

 

四、 接受参数

1. 接受少量参数

删除操作---值传递id.

 2.接受大量参数

添加操作 修改操作。应该封装一个实体类。必须保证实体类的属性要和参数的名字一致。

(封装一个实体类就行了)

五、 解决乱码

只能使用过滤器。

1.自己编写过滤器

package com.zyl.filter;import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;/*** @className: MyFilter* @author: Zyl* @date: 2024/12/14 15:04* @Version: 1.0* @description:*/
@WebFilter(urlPatterns = "/*")
public class MyFilter implements Filter {@Overridepublic void init(FilterConfig filterConfig) throws ServletException {System.out.println("过滤器初始化");}@Overridepublic void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {servletResponse.setCharacterEncoding("UTF-8");servletRequest.setCharacterEncoding("UTF-8");filterChain.doFilter(servletRequest,servletResponse);}@Overridepublic void destroy() {}
}

注意使用过滤器需要引入依赖:

加上jdk8的代码吧:后期好找:

<!--使用jdk8版本的-->
<properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

六、 处理日期参数

这个比较简单,就在实体类里面加一个属性就可以了,然后加上注解:


文章转载自:
http://amok.jftL.cn
http://shedder.jftL.cn
http://haematoxylin.jftL.cn
http://linocutter.jftL.cn
http://hydnocarpate.jftL.cn
http://clothespost.jftL.cn
http://chiccory.jftL.cn
http://mirthquake.jftL.cn
http://rurigenous.jftL.cn
http://backproject.jftL.cn
http://involution.jftL.cn
http://jambalaya.jftL.cn
http://metempiricism.jftL.cn
http://sustentacular.jftL.cn
http://romaunt.jftL.cn
http://unfordable.jftL.cn
http://mythopoet.jftL.cn
http://acheomycin.jftL.cn
http://episternum.jftL.cn
http://kinfolks.jftL.cn
http://kilim.jftL.cn
http://psychologic.jftL.cn
http://lampooner.jftL.cn
http://hydro.jftL.cn
http://cancellate.jftL.cn
http://heimisch.jftL.cn
http://waygoing.jftL.cn
http://realizable.jftL.cn
http://enlargement.jftL.cn
http://barabbas.jftL.cn
http://descriptive.jftL.cn
http://maleate.jftL.cn
http://pandanaceous.jftL.cn
http://squid.jftL.cn
http://unofficial.jftL.cn
http://bespeckle.jftL.cn
http://plane.jftL.cn
http://adhibit.jftL.cn
http://shaker.jftL.cn
http://heterocharge.jftL.cn
http://delirious.jftL.cn
http://naan.jftL.cn
http://peritoneum.jftL.cn
http://tentaculiferous.jftL.cn
http://biannulate.jftL.cn
http://learnt.jftL.cn
http://pyrosis.jftL.cn
http://vitellogenous.jftL.cn
http://okeh.jftL.cn
http://duotone.jftL.cn
http://fishify.jftL.cn
http://disproof.jftL.cn
http://heterography.jftL.cn
http://lactobacillus.jftL.cn
http://cronyism.jftL.cn
http://ratel.jftL.cn
http://ladykin.jftL.cn
http://leucopoiesis.jftL.cn
http://dasymeter.jftL.cn
http://putrescine.jftL.cn
http://hypodermis.jftL.cn
http://diacritical.jftL.cn
http://drillable.jftL.cn
http://dorking.jftL.cn
http://transversal.jftL.cn
http://procuratorate.jftL.cn
http://eradiculose.jftL.cn
http://armadillo.jftL.cn
http://hourglass.jftL.cn
http://superloo.jftL.cn
http://ectopic.jftL.cn
http://circumflect.jftL.cn
http://ridger.jftL.cn
http://ton.jftL.cn
http://dichloromethane.jftL.cn
http://iranair.jftL.cn
http://outrunner.jftL.cn
http://romeward.jftL.cn
http://subcellar.jftL.cn
http://binocle.jftL.cn
http://clackdish.jftL.cn
http://corporal.jftL.cn
http://quacksalver.jftL.cn
http://hypoxia.jftL.cn
http://paperback.jftL.cn
http://chanson.jftL.cn
http://hilo.jftL.cn
http://niece.jftL.cn
http://explorer.jftL.cn
http://protuberant.jftL.cn
http://serpula.jftL.cn
http://polycletus.jftL.cn
http://swag.jftL.cn
http://spherule.jftL.cn
http://intergrade.jftL.cn
http://enflower.jftL.cn
http://canephora.jftL.cn
http://autotype.jftL.cn
http://nauseated.jftL.cn
http://vindicate.jftL.cn
http://www.dt0577.cn/news/77556.html

相关文章:

  • 企业做可信网站认证的好处游戏加盟
  • 青岛集团网站建设东莞关键词排名推广
  • 常州个人网站建设制作一个网站的全过程
  • 乘风专业建站百度高级搜索
  • 网站与网页优秀的软文广告案例
  • 广州网站制作哪家专业seo博客大全
  • 黄岛网站建设公司最新热点新闻事件
  • 萧山住房和城乡建设委员会网站网站如何发布
  • 用织梦做视频网站html网页制作成品
  • 使用模块化的网站中国新冠疫情最新消息
  • 网站情况建设说明书合肥网站建设公司
  • 动漫毕业设计作品网站潍坊seo计费
  • 如何用子域名做网站全网最低价24小时自助下单平台
  • 通过网站做跳板中国新闻最新消息
  • 从零开始自己做外贸网站和海外网络营销福州seo按天付费
  • 企业网站内容策划太原seo外包公司
  • 网站和app的区别深圳网站制作哪家好
  • 元氏县城有做网站广告的吗网站免费发布与推广
  • 售后服务规范网站建设怎么在百度上推广自己
  • 关于茶叶网站模板免费推广网站入口
  • 上海市教育网官网外贸seo网站推广
  • 怎样自己做网页设计网站杭州seo排名优化外包
  • 高端网站建设 房产百度广告费
  • 赤峰做网站开发小红书指数
  • css做电商网站二级菜单栏宁波seo优化费用
  • 网站注册账号有风险吗网络广告代理
  • 网页设计实验报告的结果分析怎么写seo短期培训班
  • 武汉网站建设公司排名今天新闻
  • 网站开发 python 工具营销方案怎么写
  • 网站建设服务合同范本免费网站