- Linux企业运维——Redis的安装部署及主从复制、master自动切换,redis、mysql读写分离
已认证运维工程师
Linux企业运维redis主从复制redis主从切换redis集群redis-mysql读写分离
目录一、Redis是什么二、redis的安装部署三、redis主从复制四、Sentine主从自动切换1.配置sentinel文件2.master自动切换五、redis的集群cluster集群原理1.集群构建手动构建集群脚本构建集群2.节点主从自动切换3.添加节点和分片六、Redis+Mysql读写分离七、redis如何与mysql保持数据一致Gearman原理配置gearmand一、Redis是什
- Gearman-任务分发系统
瞎胡侃
其他gearman开源任务调度并行处理server
简介Gearman是一个分发任务的程序框架,可以用在各种场合,与Hadoop相比,Gearman更偏向于任务分发功能。Gearman提供了一个通用的应用程序,可以工作在更加适合处理这项任务的其他计算机或其他处理器上。它允许并行处理,载入平衡处理,而且可以在不同语言间进行调用。它可以应用于各种各样的应用场合。Gearman最初用于LiveJournal的图片resize功能,由于图片resize需要
- Gearman 集中处理日志
SkTj
F#jobserver安装在gearman-job服务器上。worker安装在worker服务器上。全部以gearman用户运行。jobserver启动命令:/opt/app/gearman/sbin/gearmand-L192.168.0.x-dworker启动命令:(/opt/app/gearman/bin/gearman-w-hgearman-job-fbusinessLogger|/usr
- gearman使用心得
天下无敌笨笨熊
分布式
gearman基础工作原理部署架构本质上,gearman可以认为是一个分布式任务队列,client是生产者,worker则是消费者。gearman并不主动分发任务,而是由worker到它那里去取任务执行,所以它采用的是类似kafka的pull消费模式。启动、停止服务servicegearmandstartservicegearmandrestartservicegearmandstop修改gear
- gearman PHP7扩展安装
ittony
注:官方提供的只支持PHP6,需要第3方支持,https://github.com/wcgallego/pecl-gearmanyuminstalllibgearman-devel-y如没装,则config时报错error:Pleaseinstalllibgearmanwgethttps://github.com/wcgallego/pecl-gearman/archive/master.zipu
- Linux企业运维---redis2
gk1205&0802
运维服务器
配置gearman实现数据同步Gearman是一个支持分布式的任务分发框架。GearmanJobServer:Gearman核心程序,以守护进程形式运行在后台。GearmanClient:可以理解为任务的收件员,比如我要在后台执行一个发送邮件的任务,可以在程序中调用一个GearmanClient并传入邮件的信息,然后就可以将执行结果立即展示给用户,而任务本身会慢慢在后台运行。GearmanWork
- lamp架构之redis(3):redis和mysql的整合
weixin_44717560
redismysql缓存
redis和mysql的整合一、redis结合mysql1.redis和mysql的基础概念2.redis和mysql的区别总结3.为什么要作缓存4.redis作为缓存二、环境部署三、mysql+redis部署四、配置gearman实现redis和mysql的数据同步1.redis和mysql结合后出现的问题2.解决方案3.gearman同步效果测试一、redis结合mysql1.redis和my
- redis的主从复制+集群+mysql缓存服务
LY_CS
redis数据库database
目录一、Redis主从复制1.redis安装配置2.Redis主从的自动切换3.集群cluster4.Rediscluster集群的故障迁移5.redis+mysql的缓存服务器6.配置gearman实现Redis和MySQL数据同步1什么是Redisredis是一个高性能的、开源的key-value数据库,而且redis是一个NOSQL类型数据库(非关系型的数据库),是为解决高并发、高扩展,大数
- MySQL+Redis缓存+Gearman共同构建数据库缓存的方法
目录前言一、前端搭建1、Nginx部署2、php部署安装以及模块安装二、后端部署1.MySQL部署2.Redis作为缓存的部署以及安装三、germand分布式缓存位置部署1、gearman原理2、C端部署3、S端部署总结前言一、前端搭建1、Nginx部署安装部署Nginxyuminstallunzipopenssl-develpcre-develgccmake-ytar-zxfnginx-1.22
- 企业运维 --- LAMP架构( redis [2] 集群部署、redis与mysql的结合)
奋斗的小猴猴
redismysql数据库
目录一、redis集群部署1.RedisCluster(Redis集群)简介2.搭建集群2、redis与mysql的结合1.环境部署2.配置gearman实现数据同步一、redis集群部署Redis集群是一个提供在多个Redis节点间共享数据的程序集,Redis集群并不支持处理多个keys的命令,因为需要移动数据,这样在高负载的情况下会发生不可预计的后果。Redis集群的优势:自动分割数据到不同的
- Linux企业运维——Redis部署+redis主从复制+redis主从自动切换(基于sentinel哨兵模式)+集群+redis+mysql 的缓存服务器+配置 gearman 实现数据同步
阿王不想秃头
运维笔记redislinuxmysql
一、redis是什么?1.Redis是一个开源(BSD许可)的,内存中的数据结构存储系统,它可以用作数据库、缓存和消息中间件。它支持多种类型的数据结构,如字符串(strings),散列(hashes),列表(lists),集合(sets),有序集合(sortedsets)与范围查询,bitmaps,hyperloglogs和地理空间(geospatial)索引半径查询。Redis内置了复制(rep
- Redis-Cluster集群、Redis持久化、Redis作MySQL的缓存服务器、配置gearman实现Redis和MySQL数据同步
lpf_linux
笔记redis数据库linux
一Cluster集群Cluster集群简介Redis的哨兵模式基本已经可以实现高可用,读写分离,但是在这种模式下每台Redis服务器都存储相同的数据,很浪费内存,所以在redis3.0上加入了Cluster集群模式,实现了Redis的分布式存储,也就是说每台Redis节点上存储不同的内容。其结构特点:1、所有的redis节点彼此互联(PING-PONG机制),内部使用二进制协议优化传输速度和带宽。
- 构建基于redis+gearman+nodejs 的消息推送系统
知~仁~勇
phpnode.js消息推送
转自:http://www.woyuw.com/?p=59前言系统的核心服务为优惠券获取、预订业务(酒店、机票等)。服务供应商有大型运营商、实体企业。随着PC、各种终端的涌现,人们对消息的即时性要求越来越高,同时也要求我们的运维第一时间能更好服务运营商、实体企业。这就要求我们的信息推送是多方的、快速的、有效的。系统定位在:构建基于事件的消息推送系统事件分为:优惠券、预订业务系统业务场景1客服通过基
- Linux企业化运维--6.Redis的部署+redis主从复制+redis自动切换+集群+redis+mysql 的缓存服务器+ gearman
代码牛马
redislinux数据库
目录1.Redis的安装2.Redis的主从复制3.Redis主从的自动切换1.配置server3的redis2.在server1中,配置sentinel4.集群cluster1.构建集群2.节点的主从自动切换3.添加节点和分配哈希槽5.redis+mysql的缓存服务器6.redis和mysql的数据一致1.Gearman2.在server3安装数据库的开发包3.注册UDF函数4.server3
- lamp架构--redis数据库(redis结合mysql,自动同步)
dandan-99
文章目录1.redis结合mysql1.1lamp架构搭建1.2server13上启动redis,server14安装mysql1.3测试文件配置1.4访问测试2.redis与mysql的自动同步2.1整体流程框图2.2安装lib_mysqludf_json2.3安装gearman-mysql-udf2.4配置gearman的worker端2.5配置mysql触发器2.6访问测试1.redis结合
- lamp(3)redis服务
qiao_qing
文章目录1.redis主从复制环境部署1)system启动2)redis常用指令:3)redis自动故障迁移2.Redis集群1.rediscluster16384号哈希槽2.redis持久化3.mysql和redis同步机制1)安装lib_mysqludf_json2)安装gearman-mysql-udf3.varnish1.根据不同的域名,分发到不同的后端主机2.负载均衡3.健康检查4.ng
- Gearman入门及使用(JAVA调用)
zhang_wq
前言因为新公司用了这个框架做任务分发,所以我才有机会知道并学习!那么Gearman到底是个什么样子的框架或系统呢?它有哪些作用、优缺点呢?Gearman是一个用来把工作委派给其他机器、分布式的调用更适合做某项工作的机器、并发的做某项工作在多个调用间做负载均衡、或用来在调用其它语言的函数的系统。可用于sso分发连接,但有弊端就是占用系统资源较多,例如CPU、内存。(来源于百度百科)简单来说,Gear
- Jenkins高可用方案汇总
萩茝
前言现在的企业很多都在用Jenkins做持续集成,各个业务端都依靠Jenkins,部署Jenkins服务时如何保障服务的高可用变得尤为重要。以下是最近收集的一些方案。Gearman+Jenkins这是openstack团队使用的方案,Jenkins本身是单体的,即只能有一个JenkinsMaster。虽然你也可以在多台机器上部署多个JenkinsMaster,但这些Master之间没有联系,都是各
- JAVA通过Gearman实现MySQL到Redis的数据同步(异步复制)
挨呀小黄
javaredis
MySQL到Redis数据复制方案无论MySQL还是Redis,自身都带有数据同步的机制,像比较常用的MySQL的Master/Slave模式,就是由Slave端分析Master的binlog来实现的,这样的数据复制其实还是一个异步过程,只不过当服务器都在同一内网时,异步的延迟几乎可以忽略。那么理论上我们也可以用同样方式,分析MySQL的binlog文件并将数据插入Redis。但是这需要对binl
- 微课 | 云CI ZUUL应用方案系列(3) 方案设计
中兴开发者社区
点击上方“中兴开发者社区”,关注我们每天读一篇一线开发者原创好文DevOps微课系列旨在帮助用户学习DevOps实践。1.方案框架OpenStackCI典型的基于ZUUL框架的通信机制图如下:开发者提交变更到Gerrit代码库后会产生Gerrit事件流,ZUUL会侦测相关事件并进行相关处理(比如准备变更测试的临时代码库),然后通过GearmanServer分发任务到JenkinsMaster,Je
- PHP安装gearman扩展编译报错:Makefile:194: recipe for target 'php_gearman.lo' failed
三级狗
PHPmake报错PHP7gearman扩展
编译gearman-php报错:Makefile:194:recipefortarget‘php_gearman.lo’failedubuntu下安装PHP7,编译安装gearman扩展时,make遇到这个报错。按照网上的教程,从wgethttp://pecl.php.net/get/gearman-1.1.1.tgz下载下来的版本无法编译通过,查询之后这个链接显示:php7暂时还不支持gearm
- 编译gearman提示缺少boost
chipiqiao3947
c/c++运维
编译german时提示缺少boost:checkingforboostlib>=1.39...configure:Wecouldnotdetecttheboostlibraries(version1.39orhigher).Ifyouhaveastagedboostlibrary(stillnotinstalled)pleasespecify$BOOST_ROOTinyourenvironment
- Gearman任务管理服务器
zoneofyang
随着系统的膨胀,越来越多的以来后台各种服务。前期用个队列或者后台定时任务啥的足以搞定。但是随着服务增多,管理和升级越来越费劲,同时也没找到合适的工具。今天刚刚好看到Gearman,相当不错。不过个人感觉还是缺了点worker管理的容器,毕竟大量的worker是需要部署的,这个本身可能就有一定的工作量。希望能有类似容器的服务器可以统一管理后端运行的所有worker,而客户端直接激发任务即可。或者对于
- 最终屏幕录制方案
weixin_34216196
屏幕录制方案需求实现任务录制任务下发后自动将动画和音频录制为MP4的视频后台服务录制进度实时更新后续分享到视频播放平台,如爱奇艺、抖音等方案架构djangocommand启动服务gearman提交下发任务后端采用PyQt5搭建服务平台QProcess执行ffmpeg录制屏幕命令QThread维持gearmanworker接受任务WebDriver加载定制页面播放动画及音频前端实现动画加载,图片按浏
- centos6.6中service启动gearman服务
你是我的绝笔
centos6
#!/bin/bash#chkconfig:-8515#descrīption:service(/usr/local/gearmand-1.1.12/sbin/gearmand)./etc/rc.d/init.d/functionsstart(){echo-n$"Starting$prog"echo-e"gearman:[确定]"/usr/local/gearmand-1.1.12/sbin/ge
- Mac OS上安装Boost C++ Libraries
olivor
在安装MacOS上安装gearman时,提示没有找到boost,需要先安装BoostC++Libraries.安装步骤如下:1.在www.boost.org下载最新的BoostC++Libraries,目前为55版本http://jaist.dl.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.gz2.解压后,cdboost_
- centos(php7)下gearman实现异步处理队列任务
Object
支付宝回调异步通知centosgearman
安装gearman需要的环境wgethttps://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gztarzxvflibevent-2.1.8-stable.tar.gzcdlibevent-2.1.8-stable./configure--prefix=
- 视觉中国的NoSQL之路:从MySQL到MongoDB
原文链接
NoSQLMongoDB
起因视觉中国网站(www.chinavisual.com)是国内最大的创意人群的专业网站。2009年以前,同很多公司一样,我们的CMS和社区产品都构建于PHP+Nginx+MySQL之上;MySQL使用了Master+Master的部署方案;前端使用自己的PHP框架进行开发;Memcached作为缓存;Nginx进行Web服务和负载均衡;Gearman进行异步任务处理。在传统的基于静态内容(如文章
- Gearman及python客户端安装和简单试用
Just_Try
项目开发
Gearman及python客户端安装和简单试用Gearman简介Gearman是一个用来把工作委派给其他机器、分布式的调用更适合做某项工作的机器、并发的做某项工作在多个调用间做负载均衡、或用来在调用其它语言的函数的系统。Gearman提供了一种通用的程序框架来将你的任务分发到不同的机器或者不同的进程当中。它提供了你进行并行工作的能力、负载均衡处理的能力,以及在不同程序语言之间沟通的能力。Gear
- 用于网页分类的python工具包
a13393665983
用于网页分类的python工具包web-classify用于网页分类的python工具包ProjectHomeDownloadsWikiIssuesSourceSummary|Updates|PeopleStarthisprojectActivity:MediumCodelicense:ApacheLicense2.0Labels:gearman,knn,web-classifyFeeds:Pro
- html
周华华
html
js
1,数组的排列
var arr=[1,4,234,43,52,];
for(var x=0;x<arr.length;x++){
for(var y=x-1;y<arr.length;y++){
if(arr[x]<arr[y]){
&
- 【Struts2 四】Struts2拦截器
bit1129
struts2拦截器
Struts2框架是基于拦截器实现的,可以对某个Action进行拦截,然后某些逻辑处理,拦截器相当于AOP里面的环绕通知,即在Action方法的执行之前和之后根据需要添加相应的逻辑。事实上,即使struts.xml没有任何关于拦截器的配置,Struts2也会为我们添加一组默认的拦截器,最常见的是,请求参数自动绑定到Action对应的字段上。
Struts2中自定义拦截器的步骤是:
- make:cc 命令未找到解决方法
daizj
linux命令未知make cc
安装rz sz程序时,报下面错误:
[root@slave2 src]# make posix
cc -O -DPOSIX -DMD=2 rz.c -o rz
make: cc:命令未找到
make: *** [posix] 错误 127
系统:centos 6.6
环境:虚拟机
错误原因:系统未安装gcc,这个是由于在安
- Oracle之Job应用
周凡杨
oracle job
最近写服务,服务上线后,需要写一个定时执行的SQL脚本,清理并更新数据库表里的数据,应用到了Oracle 的 Job的相关知识。在此总结一下。
一:查看相关job信息
1、相关视图
dba_jobs
all_jobs
user_jobs
dba_jobs_running 包含正在运行
- 多线程机制
朱辉辉33
多线程
转至http://blog.csdn.net/lj70024/archive/2010/04/06/5455790.aspx
程序、进程和线程:
程序是一段静态的代码,它是应用程序执行的蓝本。进程是程序的一次动态执行过程,它对应了从代码加载、执行至执行完毕的一个完整过程,这个过程也是进程本身从产生、发展至消亡的过程。线程是比进程更小的单位,一个进程执行过程中可以产生多个线程,每个线程有自身的
- web报表工具FineReport使用中遇到的常见报错及解决办法(一)
老A不折腾
web报表finereportjava报表报表工具
FineReport使用中遇到的常见报错及解决办法(一)
这里写点抛砖引玉,希望大家能把自己整理的问题及解决方法晾出来,Mark一下,利人利己。
出现问题先搜一下文档上有没有,再看看度娘有没有,再看看论坛有没有。有报错要看日志。下面简单罗列下常见的问题,大多文档上都有提到的。
1、address pool is full:
含义:地址池满,连接数超过并发数上
- mysql rpm安装后没有my.cnf
林鹤霄
没有my.cnf
Linux下用rpm包安装的MySQL是不会安装/etc/my.cnf文件的,
至于为什么没有这个文件而MySQL却也能正常启动和作用,在这儿有两个说法,
第一种说法,my.cnf只是MySQL启动时的一个参数文件,可以没有它,这时MySQL会用内置的默认参数启动,
第二种说法,MySQL在启动时自动使用/usr/share/mysql目录下的my-medium.cnf文件,这种说法仅限于r
- Kindle Fire HDX root并安装谷歌服务框架之后仍无法登陆谷歌账号的问题
aigo
root
原文:http://kindlefireforkid.com/how-to-setup-a-google-account-on-amazon-fire-tablet/
Step 4: Run ADB command from your PC
On the PC, you need install Amazon Fire ADB driver and instal
- javascript 中var提升的典型实例
alxw4616
JavaScript
// 刚刚在书上看到的一个小问题,很有意思.大家一起思考下吧
myname = 'global';
var fn = function () {
console.log(myname); // undefined
var myname = 'local';
console.log(myname); // local
};
fn()
// 上述代码实际上等同于以下代码
m
- 定时器和获取时间的使用
百合不是茶
时间的转换定时器
定时器:定时创建任务在游戏设计的时候用的比较多
Timer();定时器
TImerTask();Timer的子类 由 Timer 安排为一次执行或重复执行的任务。
定时器类Timer在java.util包中。使用时,先实例化,然后使用实例的schedule(TimerTask task, long delay)方法,设定
- JDK1.5 Queue
bijian1013
javathreadjava多线程Queue
JDK1.5 Queue
LinkedList:
LinkedList不是同步的。如果多个线程同时访问列表,而其中至少一个线程从结构上修改了该列表,则它必须 保持外部同步。(结构修改指添加或删除一个或多个元素的任何操作;仅设置元素的值不是结构修改。)这一般通过对自然封装该列表的对象进行同步操作来完成。如果不存在这样的对象,则应该使用 Collections.synchronizedList 方
- http认证原理和https
bijian1013
httphttps
一.基础介绍
在URL前加https://前缀表明是用SSL加密的。 你的电脑与服务器之间收发的信息传输将更加安全。
Web服务器启用SSL需要获得一个服务器证书并将该证书与要使用SSL的服务器绑定。
http和https使用的是完全不同的连接方式,用的端口也不一样,前者是80,后
- 【Java范型五】范型继承
bit1129
java
定义如下一个抽象的范型类,其中定义了两个范型参数,T1,T2
package com.tom.lang.generics;
public abstract class SuperGenerics<T1, T2> {
private T1 t1;
private T2 t2;
public abstract void doIt(T
- 【Nginx六】nginx.conf常用指令(Directive)
bit1129
Directive
1. worker_processes 8;
表示Nginx将启动8个工作者进程,通过ps -ef|grep nginx,会发现有8个Nginx Worker Process在运行
nobody 53879 118449 0 Apr22 ? 00:26:15 nginx: worker process
- lua 遍历Header头部
ronin47
lua header 遍历
local headers = ngx.req.get_headers()
ngx.say("headers begin", "<br/>")
ngx.say("Host : ", he
- java-32.通过交换a,b中的元素,使[序列a元素的和]与[序列b元素的和]之间的差最小(两数组的差最小)。
bylijinnan
java
import java.util.Arrays;
public class MinSumASumB {
/**
* Q32.有两个序列a,b,大小都为n,序列元素的值任意整数,无序.
*
* 要求:通过交换a,b中的元素,使[序列a元素的和]与[序列b元素的和]之间的差最小。
* 例如:
* int[] a = {100,99,98,1,2,3
- redis
开窍的石头
redis
在redis的redis.conf配置文件中找到# requirepass foobared
把它替换成requirepass 12356789 后边的12356789就是你的密码
打开redis客户端输入config get requirepass
返回
redis 127.0.0.1:6379> config get requirepass
1) "require
- [JAVA图像与图形]现有的GPU架构支持JAVA语言吗?
comsci
java语言
无论是opengl还是cuda,都是建立在C语言体系架构基础上的,在未来,图像图形处理业务快速发展,相关领域市场不断扩大的情况下,我们JAVA语言系统怎么从这么庞大,且还在不断扩大的市场上分到一块蛋糕,是值得每个JAVAER认真思考和行动的事情
- 安装ubuntu14.04登录后花屏了怎么办
cuiyadll
ubuntu
这个情况,一般属于显卡驱动问题。
可以先尝试安装显卡的官方闭源驱动。
按键盘三个键:CTRL + ALT + F1
进入终端,输入用户名和密码登录终端:
安装amd的显卡驱动
sudo
apt-get
install
fglrx
安装nvidia显卡驱动
sudo
ap
- SSL 与 数字证书 的基本概念和工作原理
darrenzhu
加密ssl证书密钥签名
SSL 与 数字证书 的基本概念和工作原理
http://www.linuxde.net/2012/03/8301.html
SSL握手协议的目的是或最终结果是让客户端和服务器拥有一个共同的密钥,握手协议本身是基于非对称加密机制的,之后就使用共同的密钥基于对称加密机制进行信息交换。
http://www.ibm.com/developerworks/cn/webspher
- Ubuntu设置ip的步骤
dcj3sjt126com
ubuntu
在单位的一台机器完全装了Ubuntu Server,但回家只能在XP上VM一个,装的时候网卡是DHCP的,用ifconfig查了一下ip是192.168.92.128,可以ping通。
转载不是错:
Ubuntu命令行修改网络配置方法
/etc/network/interfaces打开后里面可设置DHCP或手动设置静态ip。前面auto eth0,让网卡开机自动挂载.
1. 以D
- php包管理工具推荐
dcj3sjt126com
PHPComposer
http://www.phpcomposer.com/
Composer是 PHP 用来管理依赖(dependency)关系的工具。你可以在自己的项目中声明所依赖的外部工具库(libraries),Composer 会帮你安装这些依赖的库文件。
中文文档
入门指南
下载
安装包列表
Composer 中国镜像
- Gson使用四(TypeAdapter)
eksliang
jsongsonGson自定义转换器gsonTypeAdapter
转载请出自出处:http://eksliang.iteye.com/blog/2175595 一.概述
Gson的TypeAapter可以理解成自定义序列化和返序列化 二、应用场景举例
例如我们通常去注册时(那些外国网站),会让我们输入firstName,lastName,但是转到我们都
- JQM控件之Navbar和Tabs
gundumw100
htmlxmlcss
在JQM中使用导航栏Navbar是简单的。
只需要将data-role="navbar"赋给div即可:
<div data-role="navbar">
<ul>
<li><a href="#" class="ui-btn-active&qu
- 利用归并排序算法对大文件进行排序
iwindyforest
java归并排序大文件分治法Merge sort
归并排序算法介绍,请参照Wikipeida
zh.wikipedia.org/wiki/%E5%BD%92%E5%B9%B6%E6%8E%92%E5%BA%8F
基本思想:
大文件分割成行数相等的两个子文件,递归(归并排序)两个子文件,直到递归到分割成的子文件低于限制行数
低于限制行数的子文件直接排序
两个排序好的子文件归并到父文件
直到最后所有排序好的父文件归并到输入
- iOS UIWebView URL拦截
啸笑天
UIWebView
本文译者:candeladiao,原文:URL filtering for UIWebView on the iPhone说明:译者在做app开发时,因为页面的javascript文件比较大导致加载速度很慢,所以想把javascript文件打包在app里,当UIWebView需要加载该脚本时就从app本地读取,但UIWebView并不支持加载本地资源。最后从下文中找到了解决方法,第一次翻译,难免有
- 索引的碎片整理SQL语句
macroli
sql
SET NOCOUNT ON
DECLARE @tablename VARCHAR (128)
DECLARE @execstr VARCHAR (255)
DECLARE @objectid INT
DECLARE @indexid INT
DECLARE @frag DECIMAL
DECLARE @maxfrag DECIMAL
--设置最大允许的碎片数量,超过则对索引进行碎片
- Angularjs同步操作http请求with $promise
qiaolevip
每天进步一点点学习永无止境AngularJS纵观千象
// Define a factory
app.factory('profilePromise', ['$q', 'AccountService', function($q, AccountService) {
var deferred = $q.defer();
AccountService.getProfile().then(function(res) {
- hibernate联合查询问题
sxj19881213
sqlHibernateHQL联合查询
最近在用hibernate做项目,遇到了联合查询的问题,以及联合查询中的N+1问题。
针对无外键关联的联合查询,我做了HQL和SQL的实验,希望能帮助到大家。(我使用的版本是hibernate3.3.2)
1 几个常识:
(1)hql中的几种join查询,只有在外键关联、并且作了相应配置时才能使用。
(2)hql的默认查询策略,在进行联合查询时,会产
- struts2.xml
wuai
struts
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache