SSM的练习 :
1开发环境
数据库:mysql5.5以上版本。
Jdk:1.7
开发环境:Eclipse mars2
Spring:4.2.4
Mybatis:3.2.7
Tomcat:7
2数据库
数据库使用mysql 数据库。 1、创建crm数据库
2、将参考资料中的sql脚本导入到数据库中 3工程搭建
工程使用Springmvc、spring、mybatis框架整合完成。 Dao层:SqlMapConfig.xml(空)
applicationContext-dao.xml:数据库连接池、SqlSessionFactory、Mapper的扫描器。
Service层:
配置包扫描器,扫描所有带@Service注解的类。事务管理器、切面。
表现层:
Springmvc.xml:包扫描器@Controller、配置注解驱动、视图解析器。
Jsp:bootstrap
Web.xml:配置spring监听器,前端控制器。
3.1SqlMapConfig.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> </configuration>
3.2applicationContext-dao.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-4.2.xsd"> <!-- 配置 读取properties文件 jdbc.properties -->
<context:property-placeholder location="classpath:jdbc.properties" /> <!-- 配置 数据源 -->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
<!-- 驱动 -->
<property name="driverClassName" value="${jdbc.driver}" />
<!-- url -->
<property name="url" value="${jdbc.url}" />
<!-- 用户名 -->
<property name="username" value="${jdbc.username}" />
<!-- 密码 -->
<property name="password" value="${jdbc.password}" />
</bean> <!-- 配置 Mybatis的工厂 -->
<bean class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 数据源 -->
<property name="dataSource" ref="dataSource" />
<!-- 配置Mybatis的核心 配置文件所在位置 -->
<property name="configLocation" value="classpath:SqlMapConfig.xml" />
<!-- 配置pojo别名 -->
<property name="typeAliasesPackage" value="cn.baidu.core.bean"></property>
</bean> <!-- 配置 1:原始Dao开发 接口实现类 Mapper.xml 三个 2:接口开发 接口 不写实现类 Mapper.xml 二个 (UserDao、ProductDao
、BrandDao。。。。。。。) 3:接口开发、并支持扫描 cn.baidu.core.dao(UserDao。。。。。) 写在此包下即可被扫描到 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="cn.baidu.core.dao" />
</bean> </beans> Jdbc.properties
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/crm?characterEncoding=utf-8
jdbc.username=root
jdbc.password=root
3.3applicationContext-service.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-4.2.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> <!-- 配置 扫描 @Service -->
<context:component-scan base-package="cn.baidu.core.service"/> </beans> 3.4applicationContext-trans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
<!-- 事务管理器 -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<!-- 数据源 -->
<property name="dataSource" ref="dataSource" />
</bean>
<!-- 通知 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<!-- 传播行为 -->
<tx:method name="save*" propagation="REQUIRED" />
<tx:method name="insert*" propagation="REQUIRED" />
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="create*" propagation="REQUIRED" />
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="find*" propagation="SUPPORTS" read-only="true" />
<tx:method name="select*" propagation="SUPPORTS" read-only="true" />
<tx:method name="get*" propagation="SUPPORTS" read-only="true" />
</tx:attributes>
</tx:advice>
<!-- 切面 -->
<aop:config>
<aop:advisor advice-ref="txAdvice"
pointcut="execution(* cn.baidu.core.service.*.*(..))" />
</aop:config>
</beans>
3.5Springmvc.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-4.2.xsd">
<!-- 加载属性文件 -->
<context:property-placeholder location="classpath:resource.properties"/>
<!-- 配置扫描 器 -->
<context:component-scan base-package="cn.baidu.core.web.controller"/>
<!-- 配置处理器映射器 适配器 -->
<mvc:annotation-driven/> <!-- 配置视图解释器 jsp -->
<bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean> </beans> 3.6Web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<welcome-file-list>
<welcome-file>customer.action</welcome-file>
</welcome-file-list>
<!-- 上下文的位置 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-*.xml</param-value>
</context-param>
<!-- Spring的监听器 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> <!-- POST提交过滤器 UTF-8 -->
<filter>
<filter-name>encoding</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter> <filter-mapping>
<filter-name>encoding</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<!-- 前端控制器 -->
<servlet>
<servlet-name>crm</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<!-- 此处不配置 默认找 /WEB-INF/[servlet-name]-servlet.xml -->
<param-value>classpath:springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>crm</servlet-name>
<!-- 1:*.do *.action 拦截以.do结尾的请求 (不拦截 jsp png jpg .js .css) 2:/ 拦截所有请求
(不拦截.jsp) 建议使用此种 方式 (拦截 .js.css .png) (放行静态资源) 3:/* 拦截所有请求(包括.jsp) 此种方式 不建议使用 -->
<url-pattern>*.action</url-pattern>
</servlet-mapping>
</web-app> 3.7加入jsp及分页标签 Tld文件需要放到WEB-INF目录下, tomcat的规定。当tomcat启动时会自动加载。 Jsp中使用标签: 4查询条件初始化
4.1需求 初始化查询条件下拉列表。 4.2Sql
SELECT * from base_dict WHERE dict_type_code='006'
4.3Dao
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.baidu.crm.dao.BaseDictDao">
<select id="getBaseDictList" parameterType="string" resultType="BaseDict">
SELECT * from base_dict WHERE dict_type_code=#{typeCode}
</select>
</mapper> 4.4Service
@Service
public class BaseDictServiceImpl implements BaseDictService { @Autowired
private BaseDictDao baseDictDao; @Override
public List<BaseDict> getBaseDictList(String typeCode) {
List<BaseDict> list = baseDictDao.getBaseDictList(typeCode);
return list;
} } 4.5Controller 规则:子容器可以访问父容器的对象,父容器不能访问子容器的对象。
public class CustomerController { @Autowired
private BaseDictService baseDictService;
@Value("${customer.source.code}")
private String CustomerSourceCode;
@Value("${customer.industry.code}")
private String CustomerIndustryCode;
@Value("${customer.level.code}")
private String CustomerLevelCode; @RequestMapping("/list")
public String showCustomerList(Model model) {
//查询字典表初始化下拉列表
List<BaseDict> custSourceList = baseDictService.getBaseDictList(CustomerSourceCode);
List<BaseDict> custIndustryList = baseDictService.getBaseDictList(CustomerIndustryCode);
List<BaseDict> custLevelList = baseDictService.getBaseDictList(CustomerLevelCode);
//把列表传递给jsp页面
model.addAttribute("fromType", custSourceList);
model.addAttribute("industryType", custIndustryList);
model.addAttribute("levelType", custLevelList); return "customer";
}
} 5客户列表展示
5.1需求 展示商品列表,并且可以根据查询条件过滤查询结果,并且实现分页处理。 5.2Sql
SELECT
a.cust_id,
a.cust_name,
a.cust_user_id,
a.cust_create_id,
b.dict_item_name cust_source,
c.dict_item_name cust_industry,
d.dict_item_name cust_level,
a.cust_linkman,
a.cust_phone,
a.cust_mobile,
a.cust_zipcode,
a.cust_address,
a.cust_createtime
FROM
customer a
LEFT JOIN base_dict b ON a.cust_source = b.dict_id
LEFT JOIN base_dict c ON a.cust_industry = c.dict_id
LEFT JOIN base_dict d ON a.cust_level = d.dict_id
WHERE
cust_name LIKE '%马%'
AND cust_source = 6
AND cust_industry = 2
AND cust_level = 22 5.3Dao
<select id="getCustList" parameterType="QueryVo" resultType="customer">
SELECT
a.cust_id,
a.cust_name,
a.cust_user_id,
a.cust_create_id,
b.dict_item_name cust_source,
c.dict_item_name cust_industry,
d.dict_item_name cust_level,
a.cust_linkman,
a.cust_phone,
a.cust_mobile,
a.cust_zipcode,
a.cust_address,
a.cust_createtime
FROM
customer a
LEFT JOIN base_dict b ON a.cust_source = b.dict_id
LEFT JOIN base_dict c ON a.cust_industry = c.dict_id
LEFT JOIN base_dict d ON a.cust_level = d.dict_id
<where>
<if test="custName!=null and custName!=''">
AND cust_name LIKE '%${custName}%'
</if>
<if test="custSource!=null and custSource!=''">
AND cust_source = #{custSource}
</if>
<if test="custIndustry!=null and custIndustry!=''">
AND cust_industry = #{custIndustry}
</if>
<if test="custLevel!=null and custLevel!=''">
AND cust_level = #{custLevel}
</if>
</where>
LIMIT #{start},#{rows}
</select> 增加count后的dao
<mapper namespace="com.baidu.crm.dao.CustomerDao"> <sql id="cust_query_where">
<where>
<if test="custName!=null and custName!=''">
AND cust_name LIKE '%${custName}%'
</if>
<if test="custSource!=null and custSource!=''">
AND cust_source = #{custSource}
</if>
<if test="custIndustry!=null and custIndustry!=''">
AND cust_industry = #{custIndustry}
</if>
<if test="custLevel!=null and custLevel!=''">
AND cust_level = #{custLevel}
</if>
</where>
</sql> <select id="getCustList" parameterType="QueryVo" resultType="customer">
SELECT
a.cust_id,
a.cust_name,
a.cust_user_id,
a.cust_create_id,
b.dict_item_name cust_source,
c.dict_item_name cust_industry,
d.dict_item_name cust_level,
a.cust_linkman,
a.cust_phone,
a.cust_mobile,
a.cust_zipcode,
a.cust_address,
a.cust_createtime
FROM
customer a
LEFT JOIN base_dict b ON a.cust_source = b.dict_id
LEFT JOIN base_dict c ON a.cust_industry = c.dict_id
LEFT JOIN base_dict d ON a.cust_level = d.dict_id
<include refid="cust_query_where"/>
LIMIT #{start},#{rows}
</select>
<select id="getCustListCount" parameterType="QueryVo" resultType="int">
SELECT count(*)
FROM
customer a
LEFT JOIN base_dict b ON a.cust_source = b.dict_id
LEFT JOIN base_dict c ON a.cust_industry = c.dict_id
LEFT JOIN base_dict d ON a.cust_level = d.dict_id
<include refid="cust_query_where"/>
</select>
</mapper> 5.4Service
根据查询条件查询数据库得到客户列表。分页条件。
接收查询条件QueryVo接收,使用page接收页码。
1、通过page计算start。
2、调用dao查询客户列表。
3、做count处理。计算出此查询条件中共查询到多少条记录。 返回结果:Page对象。
条件:QueryVo
@Service
public class CustomerServiceImpl implements CustomerService { @Autowired
private CustomerDao customerDao; @Override
public Page<Customer> getCustList(QueryVo queryVo) {
queryVo.setStart((queryVo.getPage() - 1) * queryVo.getRows());
List<Customer> custList = customerDao.getCustList(queryVo);
Page<Customer> page = new Page<Customer>();
//设置客户列表
page.setRows(custList);
page.setPage(queryVo.getPage());
page.setSize(queryVo.getRows());
//计算查询总记录数
int total = customerDao.getCustListCount(queryVo);
page.setTotal(total);
return page;
} } 5.5Controller
5.5.1分析
1、接收页面提交的查询参数:
保证jsp页面提交的表单中的input 的name属性和QueryVo中的属性一致
2、调用Service查询客户列表
3、把客户列表传递给页面。 @RequestMapping("/list")
public String showCustomerList(Model model, QueryVo queryVo) throws Exception { String custName = queryVo.getCustName();
if (custName != null && !"".equals(custName)) {
custName = new String(custName.getBytes("iso8859-1"), "utf-8");
queryVo.setCustName(custName);
}
//查询字典表初始化下拉列表
List<BaseDict> custSourceList = baseDictService.getBaseDictList(CustomerSourceCode);
List<BaseDict> custIndustryList = baseDictService.getBaseDictList(CustomerIndustryCode);
List<BaseDict> custLevelList = baseDictService.getBaseDictList(CustomerLevelCode);
//查询客户列表
Page<Customer> page = customerService.getCustList(queryVo);
//把page放到request中
model.addAttribute("page", page); //把列表传递给jsp页面
model.addAttribute("fromType", custSourceList);
model.addAttribute("industryType", custIndustryList);
model.addAttribute("levelType", custLevelList); //页面回显
model.addAttribute("custName", queryVo.getCustName());
model.addAttribute("custSource", queryVo.getCustSource());
model.addAttribute("custIndustry", queryVo.getCustIndustry());
model.addAttribute("custLevel", queryVo.getCustLevel()); return "customer";
} 6修改客户信息
6.1需求 1、点击客户列表中的“修改”按钮弹出客户信息修改对话框,并初始化客户信息
2、点击“保存修改”按钮将修改后的结果保存到数据库中 6.2展示客户信息 6.2.1分析
请求的url:
customer/edit.action
参数:cust_id客户id
返回值:响应json数据,直接由Customer转换而来。需要使用@ResponseBody注解。 6.2.2Dao层
根据客户id查询客户信息。
<select id="getCustomerById" parameterType="long" resultType="customer">
select * from customer where cust_id = #{custId}
</select> 6.2.3Service层
@Override
public Customer getCustomerById(long custId) {
Customer customer = customerDao.getCustomerById(custId);
return customer;
} 6.2.4Controller
要求返回json数据
请求的url:
customer/edit.action
参数:cust_id客户id
返回值:响应json数据
@RequestMapping("/edit")
@ResponseBody
public Customer getCustomerById(Long id) {
Customer customer = customerService.getCustomerById(id);
return customer;
} 6.3提交修改
6.3.1分析
请求的url:customer/update.action
请求的方法:post
参数:表单中的数据。
返回结果:OK 6.3.2Dao层
<update id="updateCustomerById" parameterType="customer">
UPDATE customer
<set>
<if test="cust_name!=null">
cust_name=#{cust_name},
</if>
<if test="cust_user_id!=null">
cust_user_id=#{cust_user_id},
</if>
<if test="cust_create_id!=null">
cust_create_id=#{cust_create_id},
</if>
<if test="cust_source!=null">
cust_source=#{cust_source},
</if>
<if test="cust_industry!=null">
cust_industry=#{cust_industry},
</if>
<if test="cust_level!=null">
cust_level=#{cust_level},
</if>
<if test="cust_linkman!=null">
cust_linkman=#{cust_linkman},
</if>
<if test="cust_phone!=null">
cust_phone=#{cust_phone},
</if>
<if test="cust_mobile!=null">
cust_mobile=#{cust_mobile},
</if>
<if test="cust_zipcode!=null">
cust_zipcode=#{cust_zipcode},
</if>
<if test="cust_address!=null">
cust_address=#{cust_address},
</if>
<if test="cust_createtime!=null">
cust_createtime=#{cust_createtime},
</if>
</set>
WHERE
cust_id = #{cust_id}
</update>
6.3.3Service层
@Override
public void updateCustomerById(Customer customer) {
customerDao.updateCustomerById(customer);
} 6.3.4Controller
接收参数:Customer接收。
响应结果:OK字符串。使用@ResponseBody
请求的url:customer/update.action
@RequestMapping(value="/update", method=RequestMethod.POST)
@ResponseBody
public String updateCustomer(Customer customer) {
customerService.updateCustomerById(customer);
//直接向浏览器响应字符串需要使用@ResponseBody
return "OK"; } 7删除客户
7.1需求 点击客户列表中的删除按钮,提示“警告信息” 点击确定后删除用户信息,并刷新页面。 分析:
请求的url:customer/delete.action 参数:id(客户id)
响应的内容:OK(字符串需要使用@ResponseBody)

SSM框架整合之练习篇的更多相关文章

  1. SSM框架整合环境构建——基于Spring4和Mybatis3

    目录 环境 配置说明 所需jar包 配置db.properties 配置log4j.properties 配置spring.xml 配置mybatis-spring.xml 配置springmvc.x ...

  2. ssm框架整合-过程总结(第二次周总结)

    距离上次写博客已经有4.5天的时间了. 这次写博客目的是总结一下项目开始到现在,过程中遇到的问题.和学到的知识.经验. 初略总结下自己从中学到的: Spring :在学习中被反复强调的Ioc(反转控制 ...

  3. SpringMVC--从理解SpringMVC执行流程到SSM框架整合

    前言 SpringMVC框架是SSM框架中继Spring另一个重要的框架,那么什么是SpringMVC,如何用SpringMVC来整合SSM框架呢?下面让我们详细的了解一下. 注:在学习SpringM ...

  4. SSM框架整合项目 :租房管理系统

    使用ssm框架整合,oracle数据库 框架: Spring SpringMVC MyBatis 导包: 1, spring 2, MyBatis 3, mybatis-spring 4, fastj ...

  5. 基于maven的ssm框架整合

    基于maven的ssm框架整合 第一步:通过maven建立一个web项目.                第二步:pom文件导入jar包                              (1 ...

  6. JavaWeb之ssm框架整合,用户角色权限管理

    SSM框架整合 Spring SpringMVC MyBatis 导包: 1, spring 2, MyBatis 3, mybatis-spring 4, fastjson 5, aspectwea ...

  7. springmvc(二) ssm框架整合的各种配置

    ssm:springmvc.spring.mybatis这三个框架的整合,有耐心一步步走. --WH 一.SSM框架整合 1.1.整合思路 从底层整合起,也就是先整合mybatis与spring,然后 ...

  8. SSM框架整合的其它方式

    ---------------------siwuxie095                                 SSM 框架整合的其它方式         1.主要是整合 Spring ...

  9. SSM框架整合过程总结

    -----------------------siwuxie095                                 SSM 框架整合过程总结         1.导入相关 jar 包( ...

随机推荐

  1. 【02】对象的Getter and Setter

    java和C#非常相似,它们大部分的语法是一样的,但尽管如此,也有一些地方是不同的. 为了更好地学习java或C#,有必要分清它们两者到底在哪里不同. 我们这次要来探讨对象的Getter and Se ...

  2. 基于 Vue3.0 Composition Api 快速构建实战项目

    Quick Start 项目源码:https://github.com/Wscats/vue-cli 本项目综合运用了 Vue3.0 的新特性,适合新手学习

  3. SDWebImage学习之 NSCache

    1.使用SDWebImage的好处 1.异步下载(避免主线程卡死) 2.做好图片缓存(这样就不需要每次都加载网络图片) 3.解决了循环利用的问题 很容易造成内存警告

  4. 硬核! 逛了4年Github ,一口气把我收藏的 Java 开源项目分享给你!

    Awsome Java Great Java project on Github(Github 上非常棒的 Java 开源项目). English Version 大家都知道 Github 是一个程序 ...

  5. Shell入门01-bash Shell特性

    命令和文件自动补齐 [root@hadoop04 ~]# yum -y install bash-completion 命令历史记忆功能 1.上下键 查看历史命令 2.!number 执行histor ...

  6. Redis Cluster 自动化安装,扩容和缩容

    Redis Cluster 自动化安装,扩容和缩容 之前写过一篇基于python的redis集群自动化安装的实现,基于纯命令的集群实现还是相当繁琐的,因此官方提供了redis-trib.rb这个工具虽 ...

  7. 宜信SDL实践:产品经理如何驱动产品安全建设

    一.序言 本文从产品经理的角度出发,对产品经理的安全职责.产品驱动安全的内涵.工作内容.工作方法.所需安全资源.以及产品经理的安全工作量进行了分析.希望所有产品经理在没有心理负担的情况下,有目标.有方 ...

  8. Linux内核最顶层文档

    Linux 内核文档 该文件是 Linux 内核文档树中最顶层的,会随着内核一起更新:其目的是把散乱的文档集成为一个逻辑清晰的完整版,非常欢迎改善文档,如果想做出自己的贡献,加入vger.kernel ...

  9. ubuntu下安装gcc

    在ubuntu下安装gcc 第一次写blog,多多包涵! gcc安装步骤 废话不多说,gcc安装步骤如下: 1. sudo apt update 2. sudo apt install build-e ...

  10. Java修炼——四种方式解析XML_JDOM

    四种方式解析XML:DOM     JDOM    DOM4J    SAX JDOM使用前需要上传jar包. 先写一个XML栗子: <?xml version="1.0" ...