Spring学习资料以及配置环境
一、Spring4
1、介绍
新特性
SpringIDE 插件
IOC
DI
在 Spring 中配置 Bean
自动装配
Bean 之间的关系(依赖、继承)
Bean 的作用域
使用外部属性文件
SpEL
管理 Bean 的生命周期
通过工厂方法配置 Bean
通过 FactoryBean 配置 Bean
通过注解配置 Bean
泛型依赖注入
AOP 基础
前置通知
后置通知
返回通知
异常通知
环绕通知
切面的优先级
切点表达式
使用 XML 文件的方式配置 AOP
使用 JdbcTemplate 和 JdbcDaoSupport
使用 NamedParameterJdbcTemplate
Spring 的声明式事务
事务的属性(传播行为、隔离级别、回滚属性、只读属性、过期时间)
使用 XML 文件的方式配置事务
整合 Hibernate
整合 Struts2 等。
2、安装maven
1、电脑需要有Java环境
输入java -version 验证
2、下载maven
http://maven.apache.org/download.cgi
选择编译过的版本
apache-maven-3.5.0-bin.zip
解压到D盘
D:\mvn3.5\apache-maven-3.5.0
3、配置环境变量
新建环境变量
M2_HOME=D:\mvn3.5\apache-maven-3.5.0
添加PATH
;%M2_HOME%\bin;
验证
mvn -v
4、修改Maven仓库路径
如改为 d:\m2\repository
修改配置文件 D:\mvn3.5\apache-maven-3.5.0\conf\settings.xml
找到localRepository标记
修改为
D:/m2/repository 注意斜线与linux相同
把settings.xml 文件复制到D:/m2 下
5、maven目录介绍
bin 放置命令文件夹
boot 启动文件夹 默认类加载器
conf 配置文件夹 settings.xml 全局定制maven行为
lib maven运行需要的类库
6、eclipse中安装maven插件 需要网络
help --》 Install new software --》 add
在name输入 m2e
在Location 输入 http://download.eclipse.org/technology/m2e/releases
选中 search到Maven插件 依次点击next
重启eclipse
插件安装成功验证
在Window--》Preferences --》 多了一个Maven选项
7、eclipse中配置maven
在Window--》Preferences --》 Maven选项
点击 Installations
添加自己的maven
点击 User Settings
选择自己的settings.xml 文件
8、工程目录分析
src/main/java java源文件
src/test/java 测试类位置
Maven Dependencies maven依赖的jar文件
target maven编译后文件位置
pom.xml 全称Project Object Model 项目基本信息
src 存放main和test会用到的第三方资源
9、打包
在pox.xml 中 jar 指定打包类型
默认是jar
在项目的根路径下
mvn package 打包
mvn clean 清理包
验证
查看target目录
10、maven创建项目
1、Archetype
quickstart 普通java项目 打jar包
webapp web项目 打war包
2、新建webapp项目
1、在项目向导中建立项目
Archetype 选 webapp
2、给项目添加Server Runtime支持
右键项目--》属性--》java build --》 add library --》Server Runtime --》tomcat8
3、查看Deployment Assemb...
确定/src/main/webapp /
3、项目目录介绍
src/main/java 放置java源文件位置
src/main/webapp web根路径 放置前台文件位置
3、安装 eclipse spring插件 需要网络
help --》 Install new software --》 add
选择本地的springsource-tool-suite-3.8.4.RELEASE-e4.6.3-updatesite.zip
选择带IDE的四个选项
下一步 下一步 同意 完成。
重启eclipse
验证
window 首选项中有spring
4、给项目添加spring IOC支持
在pox.xml文件中
添加
org.springframework
spring-web
4.0.2.RELEASE
追加jar包 8个
spring-web-4.0.2.RELEASE.jar
spring-aop-4.0.2.RELEASE.jar
aopalliance-1.0.jar
spring-beans-4.0.2.RELEASE.jar
spring-context-4.0.2.RELEASE.jar
spring-expression-4.0.2.RELEASE.jar
spring-core-4.0.2.RELEASE.jar
commons-logging-1.1.3.jar
org.springframework
spring-context
4.0.2.RELEASE
追加jar包 7个
spring-context-4.0.2.RELEASE.jar
spring-aop-4.0.2.RELEASE.jar
aopalliance-1.0.jar
spring-beans-4.0.2.RELEASE.jar
spring-core-4.0.2.RELEASE.jar
commons-logging-1.1.3.jar
spring-expression-4.0.2.RELEASE.jar
重合7个,只需引入一个即可
5、HelloWorld
什么是bean
有无参构造器,有set,get方法的就是bean
1、写一个HelloWorld.java
public class HelloWorld {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void hello(){
System.out.println("hello "+name);
}
}
2、写一个配置文件applicationContext.xml,配置类
3、在主方法中,写代码
ApplicationContext ac =new ClassPathXmlApplicationContext("applicationContext.xml");
这句话是获取IOC容器,这个时候会把所有的bean都初始化,并set给属性赋值
HelloWorld he = (HelloWorld) ac.getBean("helloWorld");
获取被管理的bean
he.hello();
调用业务方法
6、 IOC和DI
传统 是你要,我给
ioc 你不用要,我给
DI 给的方式
7、配置Bean
bean必须有无参构造器,反射方式创建。
id 容器中类的唯一 可以有多个名字,用逗号分隔。
ApplicationContext 代表IOC容器
BeanFactory
基础设置,面向spring本身
BeanFactory ac= new ClassPathXmlApplicationContext("applicationContext.xml");
ApplicationContext
面向开发者
ApplicationContext ac =new ClassPathXmlApplicationContext("applicationContext.xml");
ClassPathXmlApplicationContext
从类路径查找
FileSystemXmlApplicationContext
从文件系统查找
BeanFactory ac= new FileSystemXmlApplicationContext("C:\\Users\\Administrator\\workspace3\\testmaven3\\src\\main\\resources\\applicationContext.xml");
getBean
通过id
推荐用
HelloWorld he = (HelloWorld) ac.getBean("helloWorld");
通过class
不推荐,不确定有几个class对象。
HelloWorld he = ac.getBean(HelloWorld.class);
基于xml
基于注解
8、注入方式
属性注入
构造注入
位置
类型
区分重载的构造器
工厂方法注入(不常用)知道就可
属性注入细节
基本数据类型+String
1\
2\
Rose
3\
4\
jack
5、包含特殊符号
]]>
对象类型
引用对象类型
内部bean
不用id,只能在内部使用
]]>
null值和级联属性
null值
级联属性
属性先初始化后才可级联处理。struts2 不一样
集合属性
Set
t1
t2
t3
Array
t1
t2
t3
List
t1
t2
t3
Map
Properties
t1
t2
t3
配置公用的集合
1、引入util命名空间
2、独立集合
t1
t2
t3
3、 ref="carss" 引用集合
使用p命名空间
1、引入p命名空间
2、使用p 比以前代码更加简洁
自动装配
autowire="byName" 通过名称装配 id名称和类属性名称一致,set方式装配
autowire="byType" 通过类型装配 相同类型的bean只能有一个
1、要装配都装配
2、byName ,byType只能2选1
Bean之间的关系
继承
parent="car"
不是java中的继承,就是利用之前bean的配置模板,快速生成新的bean,继承后,只写不同的属性。
不是所有属性都会被继承
如 autowire 、abstract等
abstract="true" 抽象bean
不能实例化
只能被继承
可以不指定class属性,没有class属性的bean一定是抽象bean
依赖
depends-on="car" 用逗号,指定多个bean
bean的加载本身没有顺序,通过depends-on 来确定先后顺序
Bean的作用域
默认单例的,用的都是一个实例。
scope="singleton" 加载容器时创建
非单例模式
scope="prototype" 每次请求时加载(懒)
使用外部属性文件
spring 2.5之后
9、spel表达式
用#{表达式}
表达式 可以是直接常量
字符串用''
动态赋值
可以是其他bean的id 类似于ref
其他bean的属性 id.shuxing
可以调用id.方法
可以通过 T() 调用静态属性
可以用正则
可以用 +-*/ %
可以用 > >= 没有id
public class MyBeanPost implements BeanPostProcessor
在init-method 方法前后被调用
12、Bean的配置方式
工厂方法
静态工厂方法
获取bean对应的工厂产生的某一个实例
id 指工厂方法中的某一个实例
class 指向静态方法
factory-method="getCar" 指向静态方法名
给静态方法传参数
实例工厂方法
需要创建工厂类对象
工厂类
通过工厂类创建的对象 没有class属性
factory-method="getCar" 指向工厂方法
参数
factory-bean="factory" 指向工厂类id
FactoryBean 创建bean
spring 提供的
定义一个类,实现FactoryBean 接口
实现三个方法
配置Bean
其他正常使用。
实际调用 factory的getObject方法
13、基于注解配置bean
@Component 标识一个受Spring管理的组件
@Resposityor 标识持久层
@Service 标识服务层
@Controller 标识控制层
可以混用
1、配置bean
组件扫描
扫描包
context:commpnent-scan
扫描后,自动生成bean
resource-pattern="an/*.class"
指定扫描的资源
包含哪些资源 可以有多个
不包含哪些资源 可以有多个
使用默认的规则
use-default-filters="true"
annotation
通过注解过滤
assignable
指定接口或者类
在bean上添加注解
2、自动装配属性
context:commpnent-scan
扫描时自动装配
@Autowired 类型兼容的bean,直接加进来
写在属性或者set方法上面
写在属性上面,不用set方法
不验证元素必须被管理(没bean)
@Autowired(require=false)
两个匹配类型
@Autowired
找名字匹配
一个是类型,多个用名字
@Qualifier
这个注解可以提供Bean名称,与@Autowired 一起用
@Resource
@Inject
14、泛型依赖注入
父类建立关联类型
父类用T 泛型
@Autowired 放在属性上面,可以被子类继承,属性受保护以上修饰
子类继承这个关系
子类具体类型
子类不写父类继承的属性
二、AOP
AOP 是面向切面编程,如日志等功能。
1、动态代理
log案例
方法内部,proxy不要使用
引入案例
2、AspectJ 的AOP
添加支持
org.springframework
spring-aop
4.0.2.RELEASE
org.aspectj
aspectjrt
1.6.11
org.aspectj
aspectjweaver
1.6.11
runtime
3、AOP
注解方式:
0、在applicationContext.xml的配置
添加
1、写一个类,写before方法
2、在类中添加另个注解,一个被ioc管理,一个作为aop的切面
@Aspect
@Component
3、在方法上写
@Before("execution(public int com.ibc.aop.test1.IComputer.add(int,int))")
@Before("execution(public int com.ibc.aop.test1.IComputer.*(int,int))")
* 表示所有方法
.. 表示参数任意
在方法中可以获取方法名和参数
point.getSignature().getName()
point.getArgs()
4、后置通知,无论方法是否有异常,都会被执行。
不能访问方法执行的结果
@After("execution(public int com.ibc.aop.test1.IComputer.*(int,int))")
5、返回通知,
@AfterReturning ,可以有返回值,有异常不执行
@AfterReturning(value="execution(public int com.ibc.aop.test1.IComputer.add(int,int))",returning="ret")
public void afterMethod(JoinPoint point,Object ret){
}
6、异常通知,
有异常才会出现
@AfterThrowing(value="execution(public int com.ibc.aop.test1.IComputer.add(..))",throwing="ex")
public void afterThrowMethod(JoinPoint point,Exception ex){}
异常类型,可以决定什么异常可以被通知。
7、环绕通知,
环绕通知需要携带ProceedingJoinPoint类型参数
相当于一个完整的动态代理
环绕通知必须有返回值,即目标方法必须有返回值
@Around(value="execution(public int com.ibc.aop.test1.IComputer.add(..))")
public Object aroundMethod(ProceedingJoinPoint point){
Object proceed =null;
try {
//前置
Signature signature = point.getSignature();
System.out.println("method -----@aroundMethod "+signature.getName()+" "+Arrays.toString(point.getArgs()));
proceed = point.proceed();
//返回通知
} catch (Throwable e) {
// TODO Auto-generated catch block
e.printStackTrace();
//异常通知
}
//后置通知
return proceed;
}
8、验证切面
如果有多个切面,可以设置切面的优先级
@Order(1)
数据越小优先级越高
9、重用切点表达式
定义一个模板方法 @Pointcut
@Pointcut("execution(public int com.ibc.aop.test1.IComputer.add(..))")
public void declareJoinPaint(){}
在类内切点方法上
@After("declareJoinPaint()")
public void afterMethod(JoinPoint point){}
在类外方法上
@After("LoggingAspect.declareJoinPaint()")
public void afterMethod(JoinPoint point){}
10、基于xml方式
11、JDBCTemplate
1、导入jar包
org.springframework
spring-jdbc
${spring.version}
2、配置
3、操作
ApplicationContext ac=new ClassPathXmlApplicationContext("application-mysql.xml");
JdbcTemplate ds=(JdbcTemplate) ac.getBean("jdbcTemplate");
1、单sql的增删改
int m= ds.update("delete from user where id=?",2);
2、批量增加
List params=new ArrayList();
params.add(new Object[]{2}); //List
int[] i=ds.batchUpdate("delete from user where id=?", params);
3、查询单条记录
String sql="select id,uname from user where id=?";
RowMapper rowMapper=new BeanPropertyRowMapper(User.class);
User user = ds.queryForObject(sql, rowMapper, 1);
用sql的别名 实现列于属性之间的映射
不支持级联属性
4、查询出集合
String sql="select id,uname from user where id>?";
RowMapper rowMapper=new BeanPropertyRowMapper(User.class);
List list=(List) ds.query(sql, rowMapper,0);
5、获取单个属性值
String sql="select count(*) from user";
Long m = ds.queryForObject(sql, Long.class);
12、具名参数JDBCTemplate
维护性高,不用对参数
1、配置
没有无参构造器
2、使用
NamedParameterJdbcTemplate ds=(NamedParameterJdbcTemplate) ac.getBean("namedParameterJdbcTemplate");
Map map =new HashMap();
map.put("un", "Rose"); //un 就是具名, 在sql中写 :un
int i = ds.update("insert into user(uname) values(:un)",map);
可以像hiberante那样操作,存对象
参数名要与属性名一致
NamedParameterJdbcTemplate ds=(NamedParameterJdbcTemplate) ac.getBean("namedParameterJdbcTemplate");
String sql="insert into user(uname) values(:uname)";
User user=new User("tatata");
SqlParameterSource paramSource=new BeanPropertySqlParameterSource(user);
int i =ds.update(sql, paramSource);
13、事务
1、声明式事务
1、添加事务依赖
org.springframework
spring-tx
${spring.version}
2、在xml配置文件中,添加事务管理
3、在service方法上面添加注解
@Transactional
2、事务传播行为
一个事务方法调用另外一个事务方法,就是事务传播
required
如果有事务在运行,就在这个事务中工作,如果没有
则新建一个事务,运行。
在事务中运行。
在对应方法上
@Transactional(propagation=Propagation.REQUIRED)
required_new
如果有事务在运行,挂起事务,然后新建事务运行,
如果没有事务,则运行新事物。
在自己的事务中运行。
在对应方法上
@Transactional(propagation=Propagation.REQUIRES_NEW)
3、事物的隔离级别
在对应方法上
@Transactional(propagation=Propagation.REQUIRES_NEW,isolation=Isolation.READ_COMMITTED)
4、默认,对所有运行时异常进行回滚
通常用默认值
@Transactional(rollbackFor={IOException.class},noRollbackFor={SQLException.class})
rollbackFor 回滚的异常类型数组
noRollbackFor 不回滚的异常类型数组
5、是否只读事务,帮助数据库引擎优化
@Transactional(readOnly=true)
6、回滚前最多需要多少时间,单位秒
@Transactional(timeout=3)
可以用sleep方法测试,单位毫秒。
-----
7、基于xml的方式
在配置文件中配置
---
回滚的异常类型数组
14、spring整合hibernate4
Spring管理SessionFactory
hibernate用spring的事务管理
1、添加支持
org.hibernate
hibernate-core
${org.hibernate-version}
commons-dbcp
commons-dbcp
1.4
org.springframework
spring-hibernate
1.2.9
2、添加配置文件
15、在eclipse中添加hibernate插件
1、hibernate Tools 的离线安装
确定eclipse的版本是neon
help --》 Install new software --》 add
在Location 输入 选择本地的插件 jbosstools-4.4.4.Final-updatesite-core.zip
点击JBoss Web and Java EE Development 选择Hibernate Tools 打√,
取消Contact all update sites during install to find required software
依次点击next
重启eclipse
2、hibernate.cfg.xml
数据源移到spring中
关联的hbm.xml 移到spring中
需要配置
hibernate的基本属性:方言,SQL显示格式化,生成数据表的策略以及二级缓存等。
16、可以不用hibernate.cfg.xml
-->
org.hibernate.dialect.MySQLDialect
true
true
update
17、spring 整合 Struts2
通过监听器整合
ServletContextListener 里面创建ApplicationContext 比较合适。
1、添加jar包
org.springframework
spring-web
4.0.2.RELEASE
org.springframework
spring-core
4.0.2.RELEASE
2、写一个ServletContextListener
创建一个ApplicationContext对象,
放入ServletContext范围中
可以建立一个Context-param 把配置名称导入进来。
3、创建一个Servlet,在Servlet中获取AC,然后获得bean,做输出。
18、spring 在web中应用
1、在web.xml中
添加一个context-param
contextConfigLocation
classpath:applicationContext.xml
2、配置ioc
org.springframework.web.context.ContextLoaderListener
3、在jsp中
ApplicationContext ac=WebApplicationContextUtils.getWebApplicationContext(application);
19、spring 集成struts2
管理struts2的anction
1、添加jar包
org.apache.struts
struts2-core
2.3.16.3
org.apache.struts
struts2-spring-plugin
2.3.16.3
2、在web.xml中
注意:struts.xml 默认是放在src的类路径下,现在我把它放在/WEB-INF/ 下了,另外,需要额外添加
struts-default.xml,struts-plugin.xml 两个配置信息。
***这是web容器连接struts2的连接点
配置的Action默认后缀是 .action
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
config
struts-default.xml,struts-plugin.xml,../struts.xml
struts2
/*
2、 在applicationContext.xml中配置Action beans
注意添加属性 scopt=prototype 表示不是单例的
3、 在struts.xml中的action中的class属性配置 spring bean的id
/ok.jsp
注意 class="helloAction" 与 id="helloAction" 相同
20、spring 集成springmvc
1、添加jar包
org.springframework
spring-core
4.0.2.RELEASE
org.springframework
spring-webmvc
4.0.2.RELEASE
2、在web.xml中配置springmvc
springDispatcherServlet
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:springmvc.xml
1
springDispatcherServlet
/
3、定义springmvc.xml文件
扫描IOC类
统一处理方法返回值前后缀
4、定义一个类用@Controller修饰,表示自动被扫描
定义一个带String返回值的方法
用@RequestMapping("/helloworld") 修饰 表示url地址
@Controller
public class HelloWorld {
@RequestMapping("/helloworld")
public String sayHello(){
System.out.println("Hello MVC");
return "success";
}
}
[访问用helloworld.do] 返回页面 prefix+"success"+ suffix 做转发操作
5、index.jsp
helloworld
21、spring集成mybatis
1、添加jar包
mysql
mysql-connector-java
5.1.18
org.springframework
spring-jdbc
4.0.2.RELEASE
c3p0
c3p0
0.9.1.2
org.mybatis
mybatis
3.4.1
org.mybatis
mybatis-spring
1.3.0
2、编写 com.ibc.test.User 类
注意,要求序列化
@Component
public class User implements Serializable{
private Integer id;
private String uname;
......
}
3、编写User-sqlmap-mapping.xml
SELECT
ID,
UNAME
FROM USER
WHERE ID = #{id}
insert into
user(uname) values(#{uname})
UPDATE USER SET uname=#{uname} WHERE ID=#{id}
DELETE USER WHERE ID=#{id}
SELECT * FROM USER
4、编写 mybatis.xml
5、编写 db.properties
url=jdbc:mysql:///test
user=root
password=root
driver=com.mysql.jdbc.Driver
6、编写spring.mybatis.xml 文件
classpath:db.properties
7、测试类
ApplicationContext ac=new ClassPathXmlApplicationContext("spring.mybatis.xml");
SqlSessionTemplate sqlSessionTemplate= (SqlSessionTemplate) ac.getBean("sqlSessionTemplate");
List list = sqlSessionTemplate.selectList("queryAll");
System.out.println(list);
22、配置文件相关的注解方法
1、定义一个类
@Configuration 表示这个类是一个类似于ApplicationContext.xml的类文件
@ComponentScan("com.ibc.ssm") //表示IOC要扫描的包
public class Config {
}
2、测试
ApplicationContext ac=new AnnotationConfigApplicationContext(Config.class);
User user=ac.getBean(User.class);
System.out.println(user);
号外:
通过注解方式定义AOP切面
1、写一个配置类
@Configuration
@ComponentScan("com.ibc.demo")
@EnableAspectJAutoProxy
public class Config {}
2、定义一个切面
@Component
@Aspect
public class LogAspect {
@Pointcut("execution( * set* (. .))")
public void myPointCut(){}
@Before("myPointCut()")
public void beforeMechod(JoinPoint point){
System.out.println("----beforeMechod--------"+point.getSignature().getName()+" "+point.getArgs());
}
}
3、定义一个实体类
@Component
public class User implements Serializable {
private String username;
private Integer uid;
private String password;
。。。。。。
}
4、测试类
@Test
public void testUser(){
ApplicationContext ac=new AnnotationConfigApplicationContext(Config.class);
User user=ac.getBean(User.class);
user.setUsername("tom");
System.out.println(user);
}
Spring学习资料以及配置环境的更多相关文章
- Maven的学习资料收集--(一)环境搭建
这几天在做项目的时候用到了maven,但是自己没有从来没有接触过,所以咋网上找资料,终于找到了一下的资料,这个是别人总结的,我只是转载过来积累.请尊重原创. 官网地址:http://maven.apa ...
- [Java] Eclipse+Spring学习(一)环境搭建
转自:http://blog.sina.com.cn/s/blog_7c3736810100qhia.html 最近由于投了一家公司实习,他要java工程师,而我大学3年的精力都花到了ASP.NET和 ...
- Eclipse+Spring学习(一)环境搭建(转)
最近由于投了一家公司实习,他要java工程师,而我大学3年的精力都花到了ASP.NET和前端上面,到找工作的时候才发现大公司不要.NET的,所以马上转型java...由于网上的高手都不屑于写这类文章, ...
- Spring学习(一)——环境准备
以前做的项目都是用.net开发的,以后准备迁移到java平台上,近期正好有个新项目要上马,所以调研下java相关技术.Spring作为java平台下的一个全栈框架, 其简洁优雅的设计和 ...
- Spring学习之xml配置Bean总结
学习Spring时,我用的是Maven来管理jar包,先看看maven的pom.xml: pom.xml <project xmlns="http://maven.apache.org ...
- 七天从零基础学习android(1)--配置环境
在写这篇文的时候android开发经验还是0,是一个萌新,这是一篇记录一个萌新从零android编程基础到能编写一个记账本的开发过程(至少我是这样美好的希望着的) 首先因为是没有开发基础的,直接上百度 ...
- [跟我学Spring学习笔记][DI配置与使用]
DI 依赖和依赖注入 定义 传统的依赖一般指"类之间的关系",那先让我们复习一下类之间的关系: 泛化:表示类与类之间的继承关系.接口与接口之间的继承关系: 实现:表示类对接口的实现 ...
- 学习openGL一——配置环境
openGL支持很多语言,C#, Java, Python, 和Lua.如果你没有使用C/C++,你必须下载和安装一个openGL包或库. 如果你使用了C/C++,你必须先建立一个编译环境,visua ...
- spring 学习资料
spring 官方教程 1.3.1 http://docs.spring.io/spring/docs/3.1.x/spring-framework-reference/html/index.html ...
随机推荐
- Codeforces Round #410 (Div. 2)D题
D. Mike and distribution time limit per test 2 seconds memory limit per test 256 megabytes input sta ...
- java虚拟机总结
jvm内存模型 u 程序计数器 u Java栈(虚拟机栈) u 本地方法栈 u Java堆 u 方法区及其运行时常量池 垃圾回收机制 u 新生代和老年代 u 参数设置 u 垃圾回收(M ...
- 设计模式--MVC(C++版)
MVC 模式代表 Model-View-Controller(模型-视图-控制器) 模式.这种模式用于应用程序的分层开发. Model(模型)-是应用程序中用于处理应用程序数据逻辑的部分.通常模型对象 ...
- FME中通过HTMLExtractor向HTML要数据
如何不断扩充数据中心的数据规模,提升数据挖掘的价值,这是我们思考的问题,数据一方面来自于内部生产,一部分数据可以来自于互联网,互联网上的数据体量庞大,形态多样,之前blog里很多FMEer已经提出了方 ...
- Linux下memcache的安装和启动测试
memcache是一套分布式的高速缓存系统,MemCache的工作流程如下:先检查客户端的请求数据是否在memcached中,如有,直接把请求数据返回,不再对数据库进行任何操作:如果请求的数据不在me ...
- DokiCam 360°4K相机:为极致运动爱好者而生
去年11月,位于中国苏州的DokiCam为其360°消费像机推出了Kickstarter人群资助活动.随着本次活动圆满结束,这款被称为DokiCam 360°的动作相机现在已经可以购买. 进入360° ...
- 新手在WindowsServer2016上安装ExchangeServer2016时的几点注意要点。
这两天试着在WindowsServer2016上安装ExchangeServer2016,遇到了两个头疼的问题,还好几经搜索加摸索终于把问题解决了,现在把经验分享出来,给遇到同样的问题的人以参考.在W ...
- 详解Google Chrome浏览器(操作篇)(下)
开篇概述 由于最近忙于公司产品的架构与研发,已经三个多月没有写博客了,收到有些朋友的来信,问为什么不及时更新博客内容呢,他们说他们正期待着某些内容.对此,非常抱歉,那么我在此也给各位朋友一些承诺,从即 ...
- ASP.NET Core 菜鸟之路:从Startup.cs说起
1.前言 本文主要是以Visual Studio 2017 默认的 WebApi 模板作为基架,基于Asp .Net Core 1.0,本文面向的是初学者,如果你有 ASP.NET Core 相关实践 ...
- Net分布式系统之六:微服务之API网关
本人建立了个人技术.工作经验的分享微信号,计划后续公众号同步更新分享,比在此更多具体.欢迎有兴趣的同学一起加入相互学习.基于上篇微服务架构分享,今天分享其中一个重要的基础组件“API网关”. 一.引言 ...