会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
why666
博客园
首页
新随笔
联系
订阅
管理
2021年1月21日
测试
摘要: 测试
阅读全文
posted @ 2021-01-21 15:23 why666
阅读(42)
评论(0)
推荐(0)
2020年9月3日
四.进行简单测试
摘要: 1.写controller层 package com.why.controller; import com.why.bean.Books; import com.why.service.Service; import org.springframework.beans.factory.annotat
阅读全文
posted @ 2020-09-03 14:24 why666
阅读(119)
评论(0)
推荐(0)
三.配置controller层
摘要: 1.配置web.xml中 <?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-in
阅读全文
posted @ 2020-09-03 14:18 why666
阅读(203)
评论(0)
推荐(0)
二.配置service层
摘要: 1.配置spring-service.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/
阅读全文
posted @ 2020-09-03 13:48 why666
阅读(232)
评论(0)
推荐(0)
一.整合MyBatis+Dao层+maven导包
摘要: 1.配置pom.xml配置文件 <dependencies> <!--Junit--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency>
阅读全文
posted @ 2020-09-03 13:30 why666
阅读(363)
评论(0)
推荐(0)
2020年9月2日
八.spring拦截器和的过滤器
摘要: 1.概念 过滤器 servlet规范中的一部分,任何java web工程都可以使用 在url-pattern中配置了/*之后,可以对所有要访问的资源进行拦截 拦截器 拦截器是SpringMVC框架自己的,只有使用了SpringMVC框架的工程才能使用 拦截器只会拦截访问的控制器方法, 如果访问的是j
阅读全文
posted @ 2020-09-02 20:53 why666
阅读(282)
评论(0)
推荐(0)
七.乱码问题
摘要: 1.使用过滤器 (之前做web项目弄过,直接贴代码 package com.why; import javax.servlet.*; import java.io.IOException; /** * @program: Spring_MVC * @description: * @author: @
阅读全文
posted @ 2020-09-02 14:51 why666
阅读(104)
评论(0)
推荐(0)
六.接收请求参数及数据回显
摘要: 1.参数一致 http://localhost:8080/MVC_04/?name=why 此时,访问的方法参数里面也写一个String name ,此时就会自动匹配对应的参数 如下,此时控制台打印处why @GetMapping("/s") public void showData(String
阅读全文
posted @ 2020-09-02 14:45 why666
阅读(234)
评论(0)
推荐(0)
五.请求转发和重定向
摘要: 1.直接上代码 package com.why.Controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.
阅读全文
posted @ 2020-09-02 14:27 why666
阅读(165)
评论(0)
推荐(0)
四.使用注解开发
摘要: 1.配置web.xml <?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-ins
阅读全文
posted @ 2020-09-02 13:06 why666
阅读(141)
评论(0)
推荐(0)
下一页
公告