Day-1 记录自己学习spring的笔记

提要:根据《Spring 3.x 企业应用开发实战》开头一个用户登录的例子,按照上面敲的。

1.项目分层

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOwAAAEsCAIAAABPLshDAAAgAElEQVR4nO2dX2zVVp7Hz8tqH/cR9WEVFaZZlqjqwjR3Eg+DUB+mUl+QKiElFaUh6Vozw6BJusswtKwKISQXQnesSVXQtMoSNGRCCSnQrSGFKMuMUho6DU0JSRsPtPwJhCQXEvLn/k29D/b1PbbPsX3/+N7j699XP0X28Tk/H9/7iX1sn9/9IRkE8rhQoTsAAmUrgBjkeTENccP6FYXuQq4l8ogTpEL3osjEFsT9jWsvv/msZm2bS/DV/sa1he5g1gKIXRBbEF/eVSb1t08MdkwMdgydam2vr8JXL+8qK3QHsxZA7ILyB3F/f38wGLSps3PNxGBHdO5iaLhz7MKR9voqfLV/55r8dNVFAcQuKE8Q9/X1lZWVlZaWWle72LBmYrAjNNwZGu4c6z2qQKytXmywgFjkkaokJKkShHgxVY0TRIHTSpO1DGhJapWUAww/kdc8ijzieJ7DmhMwxXuC7Qnbh9Y/SrdBVsoHxArBVVVVthCf37F66FTr2IUjY71Hrxxr3L1pI756fsdqSjuRN1KoL0lRJ/IaRgotSrEkcDRiklCmqog8x3GaD06QZD3gekcY8bpuSQKf7J++e6Rug6zkOsQawdXV1dYQN6xf0ba5pL2+SrHdmzYqppW0bS4hP68wn/yMJRqB+Abaskxohy2LPCdIIs8JkiwJepjJDOOO9avGczG12yAruQsxTrAtxLIs99Q9g9/J7d60EV/tqXuG3MwRxAbaLJZpXhQnGL5i0mtyGwE6GsSSwGEnZcK/mK7bICu5C3EwGCzF1NzcbF3/ZM0qixu7kzWrKO3w664oCBLhuqyu2EEsCRxGmQFISeA4Ti1VllO7kASO43kcamzUgp/Mkem/SRI46nACGHYgth6xndiy0uLG7sSWldSWqQuzbvxJvrFzALH+XgwfOid9pTDF9qe7aTPfYXKCwOOnX7WU5zmbboOsxBbEx6tX4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kv9jWsL3cHCCSCmy3WIBwYGFhYWHFa+vKtM6m+fGOyYGOwYOtXaXl+Fr17eVeZqV0EelesQd3Z2dnV1zczMOKncv3PNxGBHdO5iaLhz7MKR9voqfLV/5xq3ewvyovIB8dTU1Pvvv3/v3j3byhcb1kwMdoSGO0PDnWO9RxWItdWLDRYQmwPyiJkHRB5xgqhO8sRTGBku1cakNLyITdPH5jqLPOJ4niOm6jC7sshCh6ev0zlUxxE2SewI8Yj+UT4glvEW2nwAAAHCSURBVGV5ZmZGEITx8XHryud3rB461Tp24chY79Erxxp3b9qIr57fsZrSzvzj71YJ7dQNyvdOzPZi8G1IzSXyHMdpPjhBkvWA6xwRPDtIX2fOIKLPOmM6WLNDHylPEMuy/ODBg3379j169IhWs2H9irbNJe31VYrt3rRRMa2kbXMJ+XmFOZaJmlIO30BblgntsGWR5wRJ5NUkYjqYSQl6TXGBjtLXmf51LPJ/kR36SHmCOBQKOTkT99Q9g9/J7d60EV/tqXuG3MwRxAbaLJZpXpJJoDV8xaTX5Db6aRCLC3SUvk6tpfXbBmK/YatXPiCenp52OCY+WbPK4sbuZM0qSjs8IE8UknHRlIR2lhAb0n6Zfh+A41JnRm1QkdzG8zjUSYemuEAn6euIDs1J7FIHa3LoI7H1dOLElpUWN3YntqyktkzdPVkntHMKsfESnSINT42oOwHq/m+wrYT0cg7S1xlSOJoGNubWxp34R2w9Jz5evRK/k2uvr8JXj1fTIWZAvr+qF0xsvbEb2L/uWPXTmrVtLsFXB/Yz/MuwfnwqwIrYgtggr8ydwB/WgfIvpiEGgZwIIAZ5XgAxyPMCiEGe1/8DqAhACDoUnXEAAAAASUVORK5CYII=" alt="" />

dao:持久层

domain:领域对象(个人理解为数据表映射成一个Java类)

service:业务层

web:展现层

2.构建数据表

 2.1 数据库采用MySql 5.x 版本

 2.2 建立两个数据表 user 和 user_log 表 user 用来存放用户信息,user_log用来存放user登录信息

 2.3 user:

   aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqYAA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A0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIQ7oDACAN6Q4AgDSkOwAA0pDuAABIk6U7RVEURVEyKkn3JwAAQArSHQAAaf4fICCz2iPTjaAAAAAASUVORK5CYII=" alt="" />

3.编写UserDao、LoginLogDao类

    3.1 UserDao

    

 package com.zwy.dao;

 import java.sql.ResultSet;
import java.sql.SQLException; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowCallbackHandler;
import org.springframework.stereotype.Repository; import com.zwy.domain.User; /**
* 通过@Repository注解定义一个DAO
* */
@Repository
public class UserDao {
@Autowired//自动注入JdbcTemplate
private JdbcTemplate jdbcTemplate; /**
* 查询用户是否存在
* */
public int getMacthCount(String username,String password){
String sql="SELECT COUNT(*) FROM user WHERE user_name=? and password=? ";
return jdbcTemplate.queryForInt(sql, username,password);
}
/**
* 根据username找到相应的user 记录(对象)
* */
public User findUserByUserName(final String username){
String sql="SELECT id,user_name,credits FROM user WHERE user_name=?";
final User user=new User();
jdbcTemplate.query(sql, new Object[]{username}, new RowCallbackHandler() {
public void processRow(ResultSet reSet) throws SQLException {
user.setId(reSet.getInt("id"));
user.setUserName(reSet.getString("user_name"));
user.setCredits(reSet.getInt("credits"));
}
});
return user;
}
/**
* 根据useid更新相应的user (对象)在数据库中的记录
* 更新积分,登录IP,登录时间
* */
public void updateLoginInfo(User user){
String sql="UPDATE user SET credits=?,last_ip=?,last_time=?"
+" WHERE id=?";
jdbcTemplate.update(sql, user.getCredits(),user.getLastIp(),user.getLastTime(),user.getId());
}
}

  3.2 LoginLogDao类

package com.zwy.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository; import com.zwy.domain.UserLog; @Repository
public class LoginLogDao {
@Autowired
private JdbcTemplate jdbcTemplate; /**
* 插入一条登录记录
* */
public void insertLoginLog(UserLog user){
String sql="INSERT INTO user_log(user_id,ip,log_time)"
+" VALUES (?,?,?)";
jdbcTemplate.update(sql,user.getUserId(),user.getIp(),user.getLogTime());
}
}

  省略了domain 实体类的代码

4.业务层UserService的代码

  通过业务层组织持久化层的DAO完成业务逻辑操作

package com.zwy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import com.zwy.dao.LoginLogDao;
import com.zwy.dao.UserDao;
import com.zwy.domain.User;
import com.zwy.domain.UserLog; @Service
public class UserService {
@Autowired
private UserDao userDao;
@Autowired
private LoginLogDao loginLogDao;
/**
* 登录业务
* */
public boolean userLogin(String username,String password){
int count=userDao.getMacthCount(username, password);
return count>0;
}
/**
* 根据username找到User对象
* */
public User finUserByUserName(String username){
User user=userDao.findUserByUserName(username);
return user;
}
/**
* 成功登录,更新user的积分并添加到user_log
* */
public void successLoginLog(User user){
if(user!=null){
user.setCredits(5+user.getCredits());
UserLog userLog=new UserLog();
userLog.setUserId(user.getId());
userLog.setIp(user.getLastIp());
userLog.setLogTime(user.getLastTime());
userDao.updateLoginInfo(user);
loginLogDao.insertLoginLog(userLog);
}
}
}

5.配置applicationContext.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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
">
<!--1. 扫描类包,把标注spring注解的类自动转化成bean,同时完成bean的注入 -->
<context:component-scan base-package="com.zwy.dao"/>
<context:component-scan base-package="com.zwy.service" />
<!-- 2.定义一个使用DBCP的数据源 -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close"
p:driverClassName="com.mysql.jdbc.Driver"
p:url="jdbc:mysql://192.168.1.106:3306/spring"
p:username="root"
p:password="123456"
/>
<!-- 3.定义Spring-JDBC模板bean-->
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate" p:dataSource-ref="dataSource" />
<!--4.配置事务管理器-->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:dataSource-ref="dataSource"
/>
<!--5.配置AOP,让service包下的方法处于增强事务中-->
<aop:config proxy-target-class="true">
<aop:pointcut expression=" execution(* com.zwy.service..*(..))" id="serviceMethod"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethod"/>
</aop:config>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
</beans>

6.在Junit4下测试Service的方法

package com.zwy.service;

import java.util.Date;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.zwy.domain.User; @RunWith(SpringJUnit4ClassRunner.class)//1.基于junit4的spring测试框架
@ContextConfiguration(locations={"/applicationContext.xml"})//2.启动spring容器
public class TestService { @Autowired
private UserService userService; @org.junit.Test
public void userLogin(){
boolean b1=userService.userLogin("admin", "123456");
boolean b2=userService.userLogin("admin", "1111");
System.out.println(b1+","+b2);
}
@org.junit.Test
public void findUser(){
User user=userService.finUserByUserName("admin");
System.out.println(user);
}
@Test
public void successLog(){
User user=userService.finUserByUserName("admin");
user.setLastIp("192.168.1.101");
user.setLastTime(new Date());
userService.successLoginLog(user);
}
}

7.编写Web层,用到SpringMVC框架

ModelAndView 是这个包下的org.springframework.web.servlet.ModelAndView;不要搞成其他包下相同名字的类

package com.zwy.web;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import com.zwy.domain.User;
import com.zwy.service.UserService; //标注成为springMVC controller
@Controller
public class LoginController { @Autowired
private UserService userService;
//来自处理index.html
@RequestMapping(value="/index.html")
public String loginPage(){
return "login";
}
//来自处理loginCheck.html的请求
@RequestMapping(value="/loginCheck.html")
public ModelAndView loginCheck(HttpServletRequest request,LoginCommod loginCommod){
boolean isLogin=userService.userLogin(loginCommod.getUsername(), loginCommod.getPassword());
if(isLogin){
User user=userService.finUserByUserName(loginCommod.getUsername());
user.setLastIp(request.getRemoteAddr());
user.setLastTime(new Date());
userService.successLoginLog(user);
request.getSession().setAttribute("user", user);
return new ModelAndView("main");
}else {
//参数1:逻辑视图名 参数2:数据模型 ---参数3:数据对象
//request会以(数据模型,数据对象)的形势返回。
return new ModelAndView("login", "error", "用户名或者密码错误!");
}
} }
 package com.zwy.web;
//封装了form表单提交的信息
public class LoginCommod {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
} }

8配置web.xml

web容器自动启动Spring容器

 <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!--1. 从类路径下加载spring配置文件,classpath关键字特指类路径下加载 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<!-- 2.负责启动spring容器监听器,它将引用1处的上下文参数获得spring配置文件地址 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- spring MVC主控制的servlet -->
<servlet>
<!-- spring MVC的配置文件的名字 serviletName-servlet.xml -->
<servlet-name>zwy</servlet-name>
<servlet-class> org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!--
1)load-on-startup元素标记容器是否在启动的时候就加载这个servlet(实例化并调用其init()方法)。
2)正数的值越小,该servlet的优先级越高,应用启动时就越先加载。
-->
<load-on-startup>2</load-on-startup>
</servlet>
<!-- spring MVC处理的URL -->
<servlet-mapping>
<servlet-name>zwy</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

9.配置zwy-servlet.xml

放在WEB-INF目录下,放在src目录下报错

<?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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
">
<!-- 1.扫描web包,应用Spring注解 -->
<context:component-scan base-package="com.zwy.web" />
<!--
2.配置视图解析器,将ModelAndView及字符串解析为具体的页面
prefix指定在视图名所添加的前缀
suffix指定在视图名后添加的后缀
InternalResourceViewResolver:通过在逻辑视图名前后加后缀
-->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:viewClass="org.springframework.web.servlet.view.JstlView"
p:prefix="/WEB-INF/jsp/"
p:suffix=".jsp"
/>
</beans>

**注意 加入log4j日志框架,否则Spring框架会报错

学习《Spring 3.x 企业应用开发实战》Day-1的更多相关文章

  1. Spring 3.x 实践 第一个例子(Spring 3.x 企业应用开发实战读书笔记第二章)

    前言:工作之后一直在搞android,现在需要更多和后台的人员交涉,技术栈不一样,难免鸡同鸭讲,所以稍稍学习下. 这个例子取自于<Spring 3.x 企业应用开发实战>一书中的第二章,I ...

  2. Spring 3.x企业实用开发实战(1)

    有关Spring的介绍这里就不赘述了,主要是学习了陈雄华版的<Spring 3.x企业应用开发实战>并做了一点笔记,以助于后期的回顾和复习. 废话不多说,直接进入主题,以下所有代码基于&l ...

  3. 《精通Spring 4.X企业应用开发实战》读书笔记1-1(IoC容器和Bean)

    很长一段时间关注在Java Web开发的方向上,提及到Jave Web开发就绕不开Spring全家桶系列,使用面向百度,谷歌的编程方法能够完成大部分的工作.但是这种不系统的了解总觉得自己的知识有所欠缺 ...

  4. 《精通Spring+4.x++企业应用开发实战》读后感

    引言 还记得大三时上培训班的是时候,当时的培训老师说自己是本地讲解spring最好的讲师,但是后来等我实习了看了<Spring 3.x 企业应用开发实战>以及后续版本<精通Sprin ...

  5. 《精通Spring 4.x 企业应用开发实战》学习笔记

    第四章 IoC容器 4.1 IoC概述 IoC(Inverse of Control 控制反转),控制是指接口实现类的选择控制权,反转是指这种选择控制权从调用类转移到外部第三方类或容器的手中. 也就是 ...

  6. 《Spring 3.x 企业应用开发实战》目录

    图书信息:陈雄华 林开雄 编著 ISBN 978-7-121-15213-9 概述: 第1章:对Spring框架进行宏观性的概述,力图使读者建立起对Spring整体性的认识. 第2章:通过一个简单的例 ...

  7. Spring 3.x企业应用开发实战(14)----事务

    Spring虽然提供了灵活方便的事务管理功能,但这些功能都是基于底层数据库本身的事务处理机制工作的.要深入了解Spring的事务管理和配置,有必要先对数据库事务的基础知识进行学习. 何为数据库事务 “ ...

  8. Spring 3.x企业应用开发实战(9-1)----依赖注入

    Spring中的依赖注入方式:属性注入.构造函数注入和工厂方式注入. 1.属性注入 属性注入即通过setXxx()方法注入Bean的属性值或依赖对象. 属性注入要求Bean提供一个默认的构造函数,在J ...

  9. Spring 3.x企业应用开发实战(11)----基于@AspectJ配置切面

    1.@AspectJ的JDK必须是JDK 5.0+ 基于@AspectJ配置切面 @AspectJ采用注解描述切点.增强,两者只是表达式方式不同,效果相同. @AspectJ语法基础-----切点表达 ...

随机推荐

  1. Javascript 类数组(Array-like)对象

    Javascript中的类数组对象(Array-like object)指的是一些看起来像数组但又不是数组的对象.Javascript中的arguments变量.document.getElement ...

  2. 基于Qt QGraphicsView的多点触摸绘图

    本应用于基于QGraphicsView框架,实现多点触摸. 工程仅仅演示了多点触摸绘图,源自我前段时间一款基于Qt的绘图软件. 工程结构: kmp.h 定义了枚举 slide.h/cpp 定义了派生于 ...

  3. int*-------int

    a=(int)((int*)0 + 4)求a是多少 大家看图应该明白了  十六进制0x00000010转换为十进制就是16

  4. Android 即时语音聊天工具 开发

    使用融云SDK 1. 功能需求分析 1.1 核心功能需求: * 即时通讯 * 文字聊天 * 语音聊天 1.2 辅助功能需求: * 注册.登录 * 好友添加功能 * 好友关系管理 2. 融云即时通讯平台 ...

  5. Dao操作的抽取,BaseDao

    Dao操作通用的步骤: 0. 写SQL语句 1. 获取连接 2. 创建stmt 3. 执行sql a) 更新 b) 查询 4. 关闭/异常 代码: BaseDao /** * 通用的dao,自己写的所 ...

  6. Vim的学习心得

    现在的工作是在unix平台,平时是用UE的ftp功能来写代码的,有时候文件大了,传输就很慢,而且经常不是很稳定.下定决心要学学Vim(现在应该没有人用原始的vi了吧),在经过二周的使用后,发现Vim实 ...

  7. MAC 开发工具

    web开发编辑器 Espresso下载地址   密码: i9hr

  8. 支付宝集成获取私钥与公钥-b

    项目需要,需要在客户端集成支付宝接口.就研究了一下:因为使用支付宝接口,就需要到支付宝官网:注册帐号,并申请.下面讲的是申请好之后的操作.登录成功之后,   店家我的商家服务—在页面的下方找到——&g ...

  9. 解决win8与VC++6.0不兼容问题

    找到VC++6.0安装文件夹Bin下的MSDEV.EXE程序 将MSDEV名字改为MSDEV1(或MSDEV2,3...) 右击改好的MSDEV1,打开属性面板,选择兼容性,勾上“在兼容模式下运行”, ...

  10. 火星02坐标转换为WGS84坐标

    import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import jav ...