ssm框架配置过程
1.pom.xml配置
1.1<build>标签中配置<plugins>和<resources>,即插件和资源文件
1.2 <properties>标签中配置自定义的标签,可以在<dependency>中取出
1.3<dependencies>中配置各依赖包,统一管理
2.创建项目用到的包
1.1web层一般用到model,dao,controller,service,utils,security
1.2创建webapp下面的静态资源存放目录,如images,js,WEB-INF目录下的views
3.resources下创建资源文件
1.1先创建数据库的配置文件
##JDBC Global Setting
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1:3306/demo?useUnicode=true&characterEncoding=utf-8
jdbc.username=root
jdbc.password=root ##DataSource Global Setting #配置初始化大小、最小、最大
ds.initialSize=
ds.minIdle=
ds.maxActive= #配置获取连接等待超时的时间
ds.maxWait= #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
ds.timeBetweenEvictionRunsMillis= #配置一个连接在池中最小生存的时间,单位是毫秒
ds.minEvictableIdleTimeMillis=
1.2log4j日志的配置文件
# DEBUG,INFO,WARN,ERROR,FATAL
LOG_LEVEL=INFO log4j.rootLogger=${LOG_LEVEL},CONSOLE,FILE log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Encoding=utf-
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss} %C{}@(%F:%L):%m%n
log4j.appender.CONSOLE.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss} %C{}@(%F:%L):%m%n log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE.File=${catalina.base}/logs/ssm.log
log4j.appender.FILE.Encoding=utf-
log4j.appender.FILE.DatePattern='.'yyyy-MM-dd
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
#log4j.appender.FILE.layout=org.apache.log4j.HTMLLayout
log4j.appender.FILE.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH\:mm\:ss} %C{}@(%F\:%L)\:%m%n
1.3创建applicationContext.xml文件(spring的配置文件)
1.3.1 创建过程:(1)管理包下的注解(2)引入数据库配置文件(3)配置数据源dataSource(4)mybatis文件配置,扫描所有mapper接口,sqlsessionFactory需要配置属性dataSource,mybatis配置文件地址,mapper接口地址
(5)spring和mybatis整合,扫描所有dao,需要属性配置,dao地址,sqlsessionFactory(6)事务管理器,需要dataSource(7)事务通知,对哪些方法进行了哪些事务管理(8)事务的aop管理,需要切点与通知
(9)配置spring的cglib代理(10)开启事务的注解(11)配置spring的cache注解,需要缓存管理器,缓存管理器引用缓存管理器工厂,工厂指向ehcache.xml文件
1.3.2代码:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/cache
http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<!--自动扫描sj包,将带有注解的类纳入spring管理 在xml配置了这个标签后,spring可以自动去扫描base-pack下面或者子包下面的java文件,
如果扫描到有@Component @Controller@Service等这些注解的类,则把这些类注册为bean-->
<context:component-scan base-package="com.demo"></context:component-scan> <!--引入配置文件-->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath*:application.properties</value>
</list>
</property>
</bean> <!--配置数据源-->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/> <!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="${ds.initialSize}"/>
<property name="minIdle" value="${ds.minIdle}"/>
<property name="maxActive" value="${ds.maxActive}"/> <!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="${ds.maxWait}"/> <!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="${ds.timeBetweenEvictionRunsMillis}"/> <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name="minEvictableIdleTimeMillis" value="${ds.minEvictableIdleTimeMillis}"/> <property name="validationQuery" value="SELECT 'x'"/>
<property name="testWhileIdle" value="true"/>
<property name="testOnBorrow" value="false"/>
<property name="testOnReturn" value="false"/> <!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property name="poolPreparedStatements" value="false"/>
<property name="maxPoolPreparedStatementPerConnectionSize" value=""/> <!-- 配置监控统计拦截的filters -->
<property name="filters" value="stat"/>
</bean>
<!--mybatis扫描mapper接口-->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean" p:dataSource-ref="dataSource"
p:configLocation="classpath:mybatis-config.xml" p:mapperLocations="classpath:com/demo/web/dao/*.xml">
</bean> <!--spring与mybatis整合配置,扫描所有dao-->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer" p:basePackage="com.demo.web.dao"
p:sqlSessionFactoryBeanName="sqlSessionFactory"></bean>
<!--事务配置-->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" p:dataSource-ref="dataSource" /> <!--事务通知-->
<tx:advice id="txActive" transaction-manager="transactionManager">
<tx:attributes>
<!-- 对insert,update,delete 开头的方法进行事务管理,只要有异常就回滚 -->
<tx:method name="insert*" propagation="REQUIRED" rollback-for="java.lang.Throwable"/>
<tx:method name="update*" propagation="REQUIRED" rollback-for="java.lang.Throwable"/>
<tx:method name="delete*" propagation="REQUIRED" rollback-for="java.lang.Throwable"/>
<!-- select,count开头的方法,开启只读,提高数据库访问性能 -->
<tx:method name="select*" read-only="true"/>
<tx:method name="count*" read-only="true"/>
<!-- 对其他方法 使用默认的事务管理 -->
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<!--aop-->
<aop:config>
<aop:pointcut id="serviceMethods" expression="execution(* com.demo.web.service..*(..))"/>
<aop:advisor advice-ref="txActive" pointcut-ref="serviceMethods"></aop:advisor>
</aop:config>
<!-- 配置使Spring采用CGLIB代理 -->
<aop:aspectj-autoproxy proxy-target-class="true"/>
<!--事务的注解支持-->
<tx:annotation-driven transaction-manager="transactionManager"/>
<!--Cache配置-->
<cache:annotation-driven cache-manager="cacheManager"/>
<bean id="ehCacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="classpath:ehcache.xml"/>
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="ehCacheManagerFactory"/> </beans>
1.4创建mybatis-config.xml文件,并配置
1.4.1基本需要:与spring整合后只需一个空框架即可,不用加任何配置,也对mybatis有其他配置,如typeAliases别名,settings设置等
1.4.2代码:
<?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>
<properties>
<property name="dialectClass" value="com.demo.core.feature.orm.dialect.MySql5Dialect"/>
</properties> <!-- 配置mybatis的缓存,延迟加载等等一系列属性 -->
<settings> <!-- 全局映射器启用缓存 -->
<setting name="cacheEnabled" value="true"/> <!-- 查询时,关闭关联对象即时加载以提高性能 -->
<setting name="lazyLoadingEnabled" value="true"/> <!-- 对于未知的SQL查询,允许返回不同的结果集以达到通用的效果 -->
<setting name="multipleResultSetsEnabled" value="true"/> <!-- 允许使用列标签代替列名 -->
<setting name="useColumnLabel" value="true"/> <!-- 不允许使用自定义的主键值(比如由程序生成的UUID 32位编码作为键值),数据表的PK生成策略将被覆盖 -->
<setting name="useGeneratedKeys" value="false"/> <!-- 给予被嵌套的resultMap以字段-属性的映射支持 FULL,PARTIAL -->
<setting name="autoMappingBehavior" value="PARTIAL"/> <!-- 对于批量更新操作缓存SQL以提高性能 BATCH,SIMPLE -->
<!-- <setting name="defaultExecutorType" value="BATCH" /> --> <!-- 数据库超过25000秒仍未响应则超时 -->
<!-- <setting name="defaultStatementTimeout" value="" /> --> <!-- Allows using RowBounds on nested statements -->
<setting name="safeRowBoundsEnabled" value="false"/> <!-- Enables automatic mapping from classic database column names A_COLUMN to camel case classic Java property names aColumn. -->
<setting name="mapUnderscoreToCamelCase" value="true"/> <!-- MyBatis uses local cache to prevent circular references and speed up repeated nested queries. By default (SESSION) all queries executed during a session are cached. If localCacheScope=STATEMENT
local session will be used just for statement execution, no data will be shared between two different calls to the same SqlSession. -->
<setting name="localCacheScope" value="SESSION"/> <!-- Specifies the JDBC type for null values when no specific JDBC type was provided for the parameter. Some drivers require specifying the column JDBC type but others work with generic values
like NULL, VARCHAR or OTHER. -->
<setting name="jdbcTypeForNull" value="OTHER"/> <!-- Specifies which Object's methods trigger a lazy load -->
<setting name="lazyLoadTriggerMethods" value="equals,clone,hashCode,toString"/> <!-- 设置关联对象加载的形态,此处为按需加载字段(加载字段由SQL指 定),不会加载关联表的所有字段,以提高性能 -->
<setting name="aggressiveLazyLoading" value="false"/> </settings>
<!--写了别名就可以在mapper.xml文件中直接写类名-->
<typeAliases>
<package name="com.demo.web.model"></package>
</typeAliases> <plugins>
<plugin interceptor="com.demo.core.feature.orm.mybatis.PaginationResultSetHandlerInterceptor"/>
<plugin interceptor="com.demo.core.feature.orm.mybatis.PaginationStatementHandlerInterceptor"/>
</plugins> </configuration>
1.5配置ehcache.xml文件,缓存管理配置
<?xml version="1.0" encoding="UTF-8"?>
<ehcache updateCheck="false" name="txswx-ehcache">
<!--
磁盘存储:将缓存中暂时不使用的对象,转移到硬盘,类似于Windows系统的虚拟内存
path:指定在硬盘上存储对象的路径
-->
<diskStore path="java.io.tmpdir"/>
<!--
defaultCache:默认的缓存配置信息,如果不加特殊说明,则所有对象按照此配置项处理
maxElementsInMemory:设置了缓存的上限,最多存储多少个记录对象
eternal:代表对象是否永不过期
timeToIdleSeconds:最大的发呆时间
timeToLiveSeconds:最大的存活时间
overflowToDisk:是否允许对象被写入到磁盘
-->
<defaultCache maxEntriesLocalHeap="" eternal="true" timeToIdleSeconds="" timeToLiveSeconds=""
overflowToDisk="true" maxEntriesLocalDisk=""/>
</ehcache>
1.6创建springmvc.xml
1.6.1基础配置创建过程:(1)把controller层的注解纳入管理(2)模型视图前后缀管理(3)springmvc上传文件配置(4)整合shiro框架配置
1.6.2代码:(较为复杂的配置,不是基础配置)
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<!--controller层注入-->
<context:component-scan base-package="com.demo.web.controller"/>
<!-- 指定自己定义的validator -->
<mvc:annotation-driven validator="validator"/>
<!-- 以下 validator ConversionService 在使用 mvc:annotation-driven 会 自动注册 -->
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
<property name="providerClass" value="org.hibernate.validator.HibernateValidator"/>
<!-- 如果不加默认到 使用classpath下的 ValidationMessages.properties -->
<property name="validationMessageSource" ref="messageSource"/>
</bean> <!-- 国际化的消息资源文件(本系统中主要用于显示/错误消息定制) -->
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames">
<list>
<!-- 在web环境中一定要定位到classpath 否则默认到当前web应用下找 -->
<value>classpath:messages</value>
<value>classpath:org/hibernate/validator/ValidationMessages</value>
</list>
</property>
<property name="useCodeAsDefaultMessage" value="false"/>
<property name="defaultEncoding" value="UTF-8"/>
<property name="cacheSeconds" value=""/>
</bean>
<!--配置拦截器-->
<mvc:interceptors>
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/>
</mvc:interceptors> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
<property name="defaultLocale" value="zh_CN"/>
</bean>
<!--支持返回json(避免IE在ajax请求时,返回json出现下载 )-->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="mappingJacksonHttpMessageConverter"/>
</list>
</property>
</bean>
<bean id="mappingJacksonHttpMessageConverter"
class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/plain;charset=UTF-</value>
<value>application/json;charset=UTF-</value>
</list>
</property>
</bean>
<!--模型视图增加前后缀-->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/views/" p:suffix=".jsp"/>
<!--springMvc上传文件-->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="utf-8"/>
<property name="maxUploadSize" value=""/>
<property name="maxInMemorySize" value=""/>
</bean>
<!--启用shiro授权注解方式-->
<aop:config proxy-target-class="true"></aop:config>
<bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
<property name="securityManager" ref="securityManager"/>
</bean>
</beans>
1.7application_shiro.xml文件配置
1.7.1创建过程:(1)shiro过滤器配置(包括安全管理器,登录页面,登录成功页面,没有访问权限页面,权限设置)(2)会话DAO(3)会话管理器,需要会话DAO(4)缓存管理器,需要缓存管理配置文件路径(5)reamls配置,需要自定义的realm类(6)安全管理器,需要reamls配置(7)shiro生命周期处理器
1.7.2代码:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:util="http://www.springframework.org/schema/util"
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.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<description>apache shiro配置</description>
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<!--配置securityManager 安全管理器-->
<property name="securityManager" ref="securityManager"/>
<property name="loginUrl" value="/page/login.shtml"/>
<property name="successUrl" value="/index.shtml"/>
<property name="unauthorizedUrl" value="/page/401.shtml"/>
<property name="filterChainDefinitions">
<value>
<!-- 静态资源允许访问 -->
/app/** = anon
/assets/** = anon
<!-- 登录页允许访问 -->
/user/login = anon
<!-- 其他资源需要认证 -->
/** = authc
</value>
</property>
</bean>
<!--缓存管理器-->
<bean id="shiroEhcacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager">
<property name="cacheManagerConfigFile" value="classpath:ehcache-shiro.xml"/>
</bean> <!--会话DAO-->
<bean id="sessionDAO" class="org.apache.shiro.session.mgt.eis.MemorySessionDAO"/> <!--会话管理器-->
<bean id="sessionManager" class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager">
<property name="sessionDAO" ref="sessionDAO"/>
</bean> <!--登录规则-->
<bean id="securityRealm" class="com.cjw.web.security.SecurityRealm"/> <bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realms">
<list>
<ref bean = "securityRealm"/>
</list>
</property>
</bean>
<!-- Shiro生命周期处理器 -->
<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/> </beans>
1.8ehcache-shiro.xml配置
<ehcache updateCheck="false" name="shiroCache">
<defaultCache
maxElementsInMemory=""
eternal="false"
timeToIdleSeconds=""
timeToLiveSeconds=""
overflowToDisk="false"
diskPersistent="false"
diskExpiryThreadIntervalSeconds=""
/>
</ehcache>
1.9 web.xml配置
1.9.1创建过程:(1)spring文件初始化配置(2)spring上下文监听器配置(3)spring编码过滤器配置(4)log4j初始化配置(5)log4j监听器配置(6)shiro过滤器配置(7)前端控制器配置(8)错误页面配置
ssm框架配置过程的更多相关文章
- SSM框架整合过程总结
-----------------------siwuxie095 SSM 框架整合过程总结 1.导入相关 jar 包( ...
- ssm框架整合-过程总结(第二次周总结)
距离上次写博客已经有4.5天的时间了. 这次写博客目的是总结一下项目开始到现在,过程中遇到的问题.和学到的知识.经验. 初略总结下自己从中学到的: Spring :在学习中被反复强调的Ioc(反转控制 ...
- ssh框架配置过程
1.pom.xml配置依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns=&qu ...
- 基于SSM框架配置多数据源
项目基于ssm + maven,通过注解可以实现自动切换数据源. 一.pom.xml <?xml version="1.0" encoding="UTF-8&quo ...
- SSM框架搭建过程
引入依赖的jar包(pom.xml) a. <!--Spring SpringMVC相关--> spring-webmvc b. <!--Spring事务--> sprin ...
- ssm框架整合-过程总结(第三次周总结)
本周主要是完成前端界面和后端的整合. 犹豫前后端的工作完成程度不一致,只实现了部分整合. 登录界面. 可能自己最近没有把重心放在短学期的项目上,导致我们工作的总体进度都要比别慢. 虽然我们只是三个人的 ...
- pageoffice实现网页打开编辑保存word文档(基于SSM框架)
pageoffice是一款网页集成word.excel...等office工具 并不免费,但可以试用练习 SSM框架搭建过程就省略了 注意:由于谷歌/火狐升级,不支持插件嵌入,建议使用POBrowse ...
- 01-电子商城项目介绍及ssm框架搭建
1.B2C电商项目功能及架构 1.1功能列表 1.2系统架构(soa架构) 2.后台管理系统工程搭建及测试 ypMall,ypMall-manager-web ypMall为父项目,管理子项目的jar ...
- SSM框架中的注解,配置和控制器相关笔记
常规SSM实例 探索SSM理论的前提,应该是在对框架基础的运作方式有一定了解,以下是个人Android后台项目,用SSM框架快速搭建,以下是代码,主要 观察结构. 代码结构: model实体类 Ida ...
随机推荐
- 约束布局constraint-layout导入失败的解决方案 - 转
今天有同事用到了约束布局,但是导入我的工程出现错误 **提示错误: Could not find com.Android.support.constraint:constraint-layout:1. ...
- Pick定理、欧拉公式和圆的反演
Pick定理.欧拉公式和圆的反演 Tags:高级算法 Pick定理 内容 定点都是整点的多边形,内部整点数为\(innod\),边界整点数\(ednod\),\(S=innod+\frac{ednod ...
- python 回溯法 子集树模板 系列 —— 9、旅行商问题(TSP)
问题 旅行商问题(Traveling Salesman Problem,TSP)是旅行商要到若干个城市旅行,各城市之间的费用是已知的,为了节省费用,旅行商决定从所在城市出发,到每个城市旅行一次后返回初 ...
- Flask学习-Flask基础之WSGI
一.WSGI为什么会出现? 在学习一个东西之前,我们肯定想知道:它为什么会出现?那么,WSGI为什么会出现呢? 我们知道,部署一个web应用,经常需要使用nginx.apache或者IIS等web服务 ...
- NetBeans 插件开发简介
希望 NetBeans 为您提供更多功能吗? 您希望倾心投入到 NetBeans 的开发中,并希望它能激发您开发另一个应用程序的热情.您希望聆听音乐.浏览网页.查看邮件.存储喜欢的 URL,以及维护日 ...
- android 一些常用的功能方法代码块
我们这些苦逼的程序员在工作中,每一个老板都希望我们都能把手头的工作做好的,而且是越快越好,那我们要怎么样才能快起来呢?对于开发中常用的代码块无限复做是我们工作中简省时间最有效的途径之一,而下面的这些代 ...
- [Direct2D开发] 从资源加载位图
转载请注明出处:http://www.cnblogs.com/Ray1024 一.概述 Direct2D使用Windows图像处理组件 (WIC) 来加载位图.从文件加载位图的方法很简单,而且网上的教 ...
- node基础:文件系统-文件读取
node的文件读取主要分为同步读取.异步读取,常用API有fs.readFile.fs.readFileSync.还有诸如更底层的fs.read,以及数据流(stream),后面再总结下咯~ 直接上简 ...
- 最近在研究google的angularjs
最近在研究google的angularjs,先做个简单的例子来试试. <!doctype html> <html lang="en" ng-app="m ...
- UI Recorder 安装教程(二)
前言: UI Recorder支持无线native app(Android, iOS)录制, 基于macaca实现:https://macacajs.com/ 本次教程只针对无线native app( ...