Spring MVC+BlazeDS+Flex框架实践:Security篇

 

(本文转载自http://blog.youkuaiyun.com/meteorlWJ/archive/2009/09/13/4547759.aspx ,仅供自己学习参考)

 

文档下载地址: http://download.youkuaiyun.com/source/2559685  呵呵。。

 在Spring MVC+BlazeDS+Flex框架实践:Database篇的基础上,这次要加入的是Spring Security的配置与应用。至于Spring Security的原理及配置详解网上已经有很多可参考的文章,在这里就不再重复了。

一、Spring Security配置

1)添加Application-Security.xml

在JAVA工程src下创建Application-Security.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns="http://www.springframework.org/schema/security" 
	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-2.5.xsd
                  http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd
                   ">
	<http auto-config="true" session-fixation-protection="none" access-denied-page="/modules/common/403.jsp">
		<form-login login-page="/modules/common/Index.html" authentication-failure-url="/modules/common/Index.html"
			default-target-url="/modules/common/Index.html" />
		<logout logout-success-url="/modules/common/index.html" />	
		<intercept-url pattern="/modules/common/**" access="ROLE_ANONYMOUS" />
		<intercept-url pattern="/messagebroker/**" access="ROLE_ANONYMOUS" />
		 <intercept-url pattern="/modules/admin/**" access="ROLE_ADMIN" />		
		<intercept-url pattern="/**" access="ROLE_USER" />
	</http>
	<authentication-manager alias="authenticationManager" />
	
	<authentication-provider user-service-ref="customUserDetailsService">
	</authentication-provider>
	<beans:bean id="loggerListener" class="com.hand.common.security.SecurityLogListener">
		<beans:property name="genericService" ref="genericService" />
	</beans:bean>
	<beans:bean id="customLogoutFilter" class="org.springframework.security.ui.logout.LogoutFilter">
		<custom-filter before="LOGOUT_FILTER" />
		<beans:constructor-arg value="/"></beans:constructor-arg>
		<beans:constructor-arg>
			<beans:list>
				<beans:bean class="com.hand.common.security.SecurityLogoutHandler">
					<beans:property name="genericService" ref="genericService" />
				</beans:bean>
			</beans:list>
		</beans:constructor-arg>
	</beans:bean>
	
	<beans:bean id="customUserDetailsService" class="com.hand.common.security.FlexUserDetailsService">
		<beans:property name="genericService" ref="genericService"></beans:property>
		<beans:property name="userNameProperty">
			<beans:value>userName</beans:value>
		</beans:property>
	</beans:bean>
</beans:beans>

 2)修改web.xml

 

在添加Application-Security.xml后,需要在web.xml中将其添加到初始化加载列表中
修改web.xml以下配置:

 

<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			classpath:ApplicationContext.xml,classpath:Application-Flex.xml,classpath:Application-hibernate.xml,classpath:Application-Security.xml
		</param-value>
	</context-param>

 二、Security类创建

 

在JAVA工程src下创建package com.common.security

创建SecurityLogListener.java

 

package com.common.security;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.security.event.authentication.AbstractAuthenticationEvent;
import org.springframework.security.event.authentication.AuthenticationSuccessEvent;
import org.springframework.security.event.authentication.InteractiveAuthenticationSuccessEvent;
import org.springframework.security.ui.WebAuthenticationDetails;
import org.springframework.security.ui.session.HttpSessionApplicationEvent;
import org.springframework.security.ui.session.HttpSessionDestroyedEvent;
import com.common.hibernate.GenericService;
import flex.messaging.FlexContext;
public class SecurityLogListener implements ApplicationListener {
	private static final Log logger = LogFactory.getLog(SecurityLogListener.class);
	GenericService genericService;
	public GenericService getGenericService() {
		return genericService;
	}
	public void setGenericService(GenericService genericService) {
		this.genericService = genericService;
	}
	public void onApplicationEvent(ApplicationEvent event) {
		if (event instanceof AbstractAuthenticationEvent) {
			try {
				AbstractAuthenticationEvent authEvent = (AbstractAuthenticationEvent) event;
				if (event instanceof AuthenticationSuccessEvent) {
					Object obj = authEvent.getAuthentication().getPrincipal();
					if (obj instanceof FlexUserDetails) {
						
						System.out.println("Username: "+((FlexUserDetails) obj).getUsername());
						System.out.println("Login Date: "+new Date());
						System.out.println("Session Id: "+FlexContext.getFlexSession().getId());
					}
				} else if (event instanceof InteractiveAuthenticationSuccessEvent)
					logger.warn("InteractiveAuthenticationSuccessEvent:" + authEvent.getAuthentication().getDetails());
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		} else if (event instanceof HttpSessionApplicationEvent) {
			HttpSessionApplicationEvent sessionEvent = (HttpSessionApplicationEvent) event;
			if (event instanceof HttpSessionDestroyedEvent) {
				logger.info("[destroy]"+sessionEvent.getSession().getId());
				Map<String, Object> params = new HashMap<String, Object>();
				params.put("sessionId", sessionEvent.getSession().getId());
				System.out.println("Session Id: "+sessionEvent.getSession().getId());
				System.out.println("Session remove date: "+new Date());
				
			}else 
				logger.info("[create]"+sessionEvent.getSession().getId());
		}
	}
}

 

 创建SecurityLogoutHandler.java

 

package com.common.security;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.security.Authentication;
import org.springframework.security.ui.logout.SecurityContextLogoutHandler;
import com.common.hibernate.GenericService;
public class SecurityLogoutHandler extends SecurityContextLogoutHandler {
	private static final Log logger = LogFactory.getLog(SecurityLogoutHandler.class);
	GenericService genericService;
	public SecurityLogoutHandler() {
		super();
	}
	public GenericService getGenericService() {
		return genericService;
	}
	public void setGenericService(GenericService genericService) {
		this.genericService = genericService;
	}
	public void logout(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse,
			Authentication authentication) {
		try {
			Map<String, Object> params = new HashMap<String, Object>();
			params.put("sessionId", httpservletrequest.getSession().getId());
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		super.logout(httpservletrequest, httpservletresponse, authentication);
	}
}

 创建FlexUserDetails.java

 

 

 

此类中的信息与数据库的结构有关

 

package com.common.security;
import java.util.Date;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.userdetails.UserDetails;
import com.admin.domain.FrameworkUser;
public class FlexUserDetails implements UserDetails {
    private FrameworkUser fu;
    private GrantedAuthority[] authorities;
    public FlexUserDetails(FrameworkUser user,GrantedAuthority[] roles){
    	this.fu=user;
    	this.authorities=roles;
    	
    }
	public GrantedAuthority[] getAuthorities() {
		return authorities;
	}
	public String getPassword() {
		return fu.getUserPassword();
	}
	public String getUsername() {
		// TODO Auto-generated method stub
		return fu.getUserName();
	}
	public boolean isAccountNonExpired() {
     return true;
	}
	public boolean isAccountNonLocked() {
		// TODO Auto-generated method stub
		return true;
	}
	public boolean isCredentialsNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}
	public boolean isEnabled() {
		Date now=new Date();
		return fu.getStartDateActive().before(now)&&(fu.getEndDateActive()==null||fu.getEndDateActive().after(now));
	}
	public FrameworkUser getFu() {
		return fu;
	}
	public void setFu(FrameworkUser fu) {
		this.fu = fu;
	}
	public void setAuthorities(GrantedAuthority[] authorities) {
		this.authorities = authorities;
	}
}

 创建FlexUserDetailsService.java

 

     此类中具体执行了用户登录时的授权等操作,其中明确了当用户为"admin"时,为其授予ROLE_ADMIN、ROLE_USER、ROLE_ANONYMOUS权限;而其他用户则只有ROLE_USER、ROLE_ANONYMOUS权限。不同权限的访问范围在Application-Security.xml中进行控制。本例中只有ROLE_ADMIN权限的角色才能访问modules/admin下的页面。

 

package com.common.security;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.context.support.MessageSourceAccessor;
import org.springframework.dao.DataAccessException;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.GrantedAuthorityImpl;
import org.springframework.security.SpringSecurityMessageSource;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.security.userdetails.UsernameNotFoundException;
import com.admin.domain.FrameworkUser;
import com.common.hibernate.GenericService;
public class FlexUserDetailsService implements UserDetailsService {
	private static final Logger logger = Logger.getLogger(AuthenticationHelper.class);
	private GenericService genericService;
	private String userNameProperty;
	protected MessageSourceAccessor messages;
	private String authoritiesbyUsernameQuery;
	public FlexUserDetailsService() {
		messages = SpringSecurityMessageSource.getAccessor();
	}
	public GenericService getGenericService() {
		return genericService;
	}
	public void setGenericService(GenericService genericService) {
		this.genericService = genericService;
	}
	public String getUserNameProperty() {
		return userNameProperty;
	}
	public void setUserNameProperty(String userNameProperty) {
		this.userNameProperty = userNameProperty;
	}
	public String getAuthoritiesbyUsernameQuery() {
		return authoritiesbyUsernameQuery;
	}
	public void setAuthoritiesbyUsernameQuery(String authoritiesbyUsernameQuery) {
		this.authoritiesbyUsernameQuery = authoritiesbyUsernameQuery;
	}
	public UserDetails loadUserByUsername(String name) throws UsernameNotFoundException, DataAccessException {
		System.out.println("UserDetails: loadUserByUsername");
		List users = new ArrayList();
		try {
			users = this.loadUsersByUsername(name);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		if (users.size() == 0)
			throw new UsernameNotFoundException(messages.getMessage("JdbcDaoImpl.notFound", new Object[] { name },
					"Username {0} not found"), name);
		FrameworkUser user = (FrameworkUser) users.get(0);
		GrantedAuthority[] roles = loadUserAuthorities(name);
		if (roles == null)
			throw new UsernameNotFoundException(messages.getMessage("JdbcDaoImpl.noAuthority", new Object[] { name },
					"User {0} has no GrantedAuthority"), name);
		logger.info("roles " + roles.length);
		logger.info("login in success," + user.getUserName());
		return new FlexUserDetails(user, roles);
	}
	private List<Object> loadUsersByUsername(String name) throws Exception {
		System.out.println("List<Object>: loadUserByUsername");
		Map<String, Object> params = new HashMap<String, Object>();
		params.put(this.userNameProperty, name);
		return genericService.findByProperty(FrameworkUser.class.getName(), params);
	}
	private GrantedAuthority[] loadUserAuthorities(String name) {
		Map params = new HashMap();
		params.put("userName", name);
		
		List<GrantedAuthority> roles = new ArrayList<GrantedAuthority>();
		
		if(name.equals("admin")){
			roles.add(new GrantedAuthorityImpl(name));
			roles.add(new GrantedAuthorityImpl("ROLE_ANONYMOUS"));
			roles.add(new GrantedAuthorityImpl("ROLE_ADMIN"));
			roles.add(new GrantedAuthorityImpl("ROLE_USER"));
			System.out.println("授权: ROLE_ADMIN,ROLE_ANONYMOUS");
		}else{
			roles.add(new GrantedAuthorityImpl(name));
			roles.add(new GrantedAuthorityImpl("ROLE_ANONYMOUS"));
			roles.add(new GrantedAuthorityImpl("ROLE_USER"));
			System.out.println("授权: ROLE_USER,ROLE_ANONYMOUS");
		}		
		GrantedAuthority[] authoritiesarray = new GrantedAuthority[roles.size()];
		roles.toArray(authoritiesarray);
		return authoritiesarray;
	}
}
 

创建AuthenticationHelper.java

     此类在用户登录时被调用

 

package com.common.security;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationManager;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
import org.springframework.security.userdetails.UserDetails;
import flex.messaging.FlexContext;
public class AuthenticationHelper {
	private static final Logger logger = Logger.getLogger(AuthenticationHelper.class);
	private AuthenticationManager authenticationManager;
	public AuthenticationManager getAuthenticationManager() {
		return authenticationManager;
	}
	public void setAuthenticationManager(AuthenticationManager authenticationManager) {
		this.authenticationManager = authenticationManager;
	}
	public void authenticatePrincipal(String username, String password) {
		//try{
		logger.info("user login system! username:" + username);
		UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(
				username, password);
		Authentication authentication = authenticationManager.authenticate(usernamePasswordAuthenticationToken);
		SecurityContextHolder.getContext().setAuthentication(authentication);
		GrantedAuthority[] authorities = SecurityContextHolder.getContext().getAuthentication().getAuthorities();
		int numAuthorities = authorities.length;
		String[] grantedRoles = new String[numAuthorities];
		for (int counter = 0; counter < numAuthorities; counter++) {
			grantedRoles[counter] = authorities[counter].getAuthority();
		}
		String name = SecurityContextHolder.getContext().getAuthentication().getName();
		logger.info("登录成功!");
		//}catch(Exception e){e.printStackTrace();}
	}
	public Map getCurrentUser() {
		if (SecurityContextHolder.getContext() == null
				|| SecurityContextHolder.getContext().getAuthentication() == null
				|| SecurityContextHolder.getContext().getAuthentication().getPrincipal() == null) {
			Map temp = new HashMap();
			temp.put("userName", "System");
			temp.put("userId", 0);
			return temp;
		}
		Map user = new HashMap();
		Object obj = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
		if (obj instanceof UserDetails) {
			user.put("userDescription", ((FlexUserDetails) obj).getFu().getUserDescription());
			user.put("userId", ((FlexUserDetails) obj).getFu().getUserId());
			user.put("userName", ((FlexUserDetails) obj).getUsername());
		} else {
			user.put("userName", obj.toString());
			user.put("userId", -100);
		}
		logger.info(user);
		return user;
	}
	public Long getCurrentUserId() {
		if (this.getCurrentUser().get("userId") != null)
			return Long.valueOf(this.getCurrentUser().get("userId").toString());
		return new Long(-100);
	}
}
 

 

三、配置AuthenticationHelper

1)发布AuthenticationHelper

在Application-Flex.xml中添加如下配置:

 

<bean id="authenticationHelper" class="com.hand.common.security.AuthenticationHelper">
		<property name="authenticationManager" ref="authenticationManager"></property>
		<flex:remoting-destination />
	</bean>
 

 

2)创建CommonModule.mxml

在FLEX工程modules/common目录下创建CommonModule.mxml,用以实现Security验证

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="500" height="300">
	<mx:RichTextEditor x="0" y="0" title="Title" width="100%" height="100%">
	</mx:RichTextEditor>
</mx:Module>

 3)引用authenticationHelper

 

在FLEX工程remoting-config.xml中添加如下配置

 

 

<destination id="authenticationHelper">
		<properties>
			<source>authenticationHelper</source>
		</properties>
	</destination>

 3)修改Index.mxml

在Index.mxml中调用authenticationHelper,修改后的Index.mxml内容如下:<?xml version="1.0" encoding="utf-8"?>

 

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
	            layout="vertical"
	            horizontalAlign="center"
	            creationComplete="initApp()" 
	            fontSize="15" >
	
	<mx:Script>
		<!--[CDATA[
			import mx.rpc.events.FaultEvent;
			import mx.rpc.events.ResultEvent;
			import mx.controls.Alert;
			
			private function initApp():void{
				
				UserService.getMessage();
				UserService.getMessage.addEventListener(ResultEvent.RESULT, getMessageHandler);
			}
			private function getMessageHandler(evt:ResultEvent):void{
				UserService.getMessage.removeEventListener(ResultEvent.RESULT, getMessageHandler);
				initText.text = evt.result as String;
			}
			private function login():void{
				//添加登录成功监听器
				authenticationHelper.authenticatePrincipal.addEventListener(ResultEvent.RESULT, loginSuccess);
				//添加登录失败监听器
				authenticationHelper.authenticatePrincipal.addEventListener(FaultEvent.FAULT, loginFailure);
				//向服务器发送登录请求
				authenticationHelper.authenticatePrincipal(username.text, password.text);
			}
			
			private function loginSuccess(event:Event):void
			{
				authenticationHelper.authenticatePrincipal.removeEventListener(ResultEvent.RESULT, loginSuccess);
				this.currentState='loginSuccess';
			}
			
			private function loginFailure(event:FaultEvent):void
			{
				Alert.show("登录不成功!"+event.fault.faultString);
				authenticationHelper.removeEventListener(FaultEvent.FAULT, loginFailure);
			}
			private function changeState(sign:String):void{
				currentState = 'moduleState';
				if(sign=='A'){
					currentState = 'moduleState';
					moduleLoader.url = '../admin/UserModule.swf';
				}else{
					currentState = 'moduleState';
					moduleLoader.url = '../common/CommonModule.swf';
				}
			}
			private function logout():void{
				navigateToURL(new URLRequest("javascript:location.href='TestProject/j_spring_security_logout';"), "_self");
			}
			
		]]-->
	</mx:Script>
	<mx:RemoteObject id="UserService" destination="UserService"/>
	<mx:RemoteObject id="authenticationHelper" destination="authenticationHelper"/>
	<mx:states>
		<mx:State name="loginSuccess">
			<mx:RemoveChild target="{vbox1}"/>
			<mx:AddChild position="lastChild">
				<mx:VBox width="50%" height="30%" horizontalAlign="center" verticalAlign="middle">
					<mx:LinkButton label="admin.mxml" click="changeState('A')"/>
					<mx:LinkButton label="common.mxml" click="changeState('B')"/>
				</mx:VBox>
			</mx:AddChild>
		</mx:State>
		<mx:State name="moduleState">
			<mx:RemoveChild target="{vbox1}"/>
			<mx:AddChild position="lastChild">
				<mx:ModuleLoader width="50%" height="50%" id="moduleLoader" url="../admin/UserModule.swf"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:LinkButton label="返回" click="currentState='loginSuccess'"/>
			</mx:AddChild>
			<mx:AddChild position="lastChild">
				<mx:LinkButton label="退出" click="logout()"/>
			</mx:AddChild>
		</mx:State>
	</mx:states>
	<mx:Label text="Welcome" id="initText" fontWeight="bold"/>
	<mx:VBox width="50%" height="50%" horizontalAlign="center" verticalAlign="middle" id="vbox1"> 
	  <mx:FormItem label="用户名" labelWidth="100">
	  	<mx:TextInput id="username" width="200"/>
	  </mx:FormItem>
	  <mx:FormItem label="密码" labelWidth="100">
	  	<mx:TextInput id="password" width="200"  displayAsPassword="true"/>
	  </mx:FormItem>
	  <mx:Button label="登录" width="80" click="login()"/>
	</mx:VBox>
</mx:Application>
 

四、编译运行
1)编译FLEX工程
选择Project—>Clean—>TestProject

2)拷贝FLEX编译目录bin-debug/modules到JAVA工程WebRoot下

3)启动本地数据库

4)启动服务器

5)服务器正常启动后,在浏览器内输入(其中9090为服务器端口号)

http://localhost:9090/TestProject/modules/common/Index.html

运行结果:
以Sky用户登录

 

 

【扩展卡尔曼滤波器EKF】基于UWB雷达的SLAM能够在室内环境内映射自然点地标,并改善机器人定位(Matlab代码实现) 内容概要:本文档提供了名为“Plecs全桥LLC谐振变换器仿真模型”的资源,主要用于电力电子领域中LLC谐振变换器的建模与仿真研究。该模型基于Plecs软件平台构建,聚焦于全桥LLC拓扑结构,涵盖其工作原理、关键参数设计及动态性能仿真,帮助用户深入理解LLC谐振变换器在软开关、高效率功率转换方面的特性与实现方法。文档内容包括系统建模、主电路参数计算、控制策略实现以及仿真结果分析等部分,适用于高频高效电源变换器的研发与教学实践。; 适合人群:具备电力电子与电力系统基础知识,从事电源变换器设计、仿真与优化工作的工程师及高校研究生。; 使用场景及目标:① 掌握LLC谐振变换器的工作机理与Plecs仿真建模流程;② 学习全桥LLC拓扑的参数设计与软开关实现方法;③ 为高频高效DC-DC变换器的科研、课程设计或工程项目提供仿真基础和技术参考。; 阅读建议:建议结合电力电子技术教材与Plecs官方文档同步学习,重点理解谐振腔参数(如Lr、Cr、Lm)对增益特性与软开关的影响,并通过调整仿真参数验证不同工况下的系统响应,以加深对LLC变换器设计规律的理解。 立即下载

相关推荐

5G 网络的移动性管理上下文对比介绍

5G 网络的移动性管理上下文对比介绍 4G/5G MM移动性管理机制对比 5G引入了新移动性管理状态,通过mobility pattern(移动方式)实现按需的移动性管理等。 MM的相关状态分为一下几种: RM状态(用户注册管理 注册态/非注册态)和CM状态(用户连接态/空闲态)独立;RM状态标识UE是否注册到网络,CM状态标识UE和核心网的信令连接是否存在。 RAN侧引入RRC-inactive state:UE(用户端)对于CN(核心网)而言处于连接态,对RAN(接入网)而言处于Ld..

m0_59032675的博客 4818

登录认证和链接权限的相关知识

Shiro 提供了一个直接拿来用的UsernamePasswordToken,用于实现用户名/密码Token组,另外其实现了RememberMeAuthenticationToken和HostAuthenticationToken,可以实现记住我及主机验证的支持 登录认证实现 在认证、授权内部实现机制中都有提到,最终处理都将交给Real进行处理。因为在Shiro中,最终是通过Realm来获取应...

weixin_43833993的博客 518

Vector CANape的使用记录

开门见山,今天想和大家分享下CANape使用记录,分享原因是近日在分析一个客户现场软件问题时,需要用到CANape来实时的监测ECU中的变量,因为之前对CANape的认知比较浅薄,觉得标定工程师使用他就足够了,但是这次的经历让我觉得需要写点东西来记录自己学习并使用他的过程。 相信大家能够在网上找到很多关于如何使用CANape的文章,从新建Project到后面的数据的观测、保存以及回放等等。我个人也是这么学过来的,所以我不打算从那些方面着手去描述如何使用她,而是根据我的真实使用过程以及问题的抛出到如何解决来

2万+

指纹登录 OnAuthenticationHelp 1021,1022,1023,1001错误

xamarin Android条用指纹验证的时候, 小米10 回调OnAuthenticationFailed 会返回1021 小米6 回调OnAuthenticationFailed 会返回1022 魅族 回调OnAuthenticationFailed 会返回1001 OnAuthenticationFailed一般是指纹移动过快才会触发, 目前解决办法是,跳过。。。 public override void OnAuthenticationHelp(int helpMsgId, ICharSe

qq_37935177的博客 1343

MaxEnt运行报错的各种问题及解决方法

由于我使用的环境数据并不是大部分人常用的worldclim上下载的气候数据,而是使用不同的四类环境数据,分别包括:降雨数据、气温数据、氮沉降数据和大气CO2浓度数据,数据需要分别从不同的网站下载,因此并不能得到非常一致的数据文件,导致MaxEnt运行时出现了各种各样的错误。文件终于能够读取了,然而计算到一半又弹出第三种问题,根据弹出的报错提示,找到错误所在那一行,用Notepad++打开,可以发现,这一行确实存在nan值,导致文件读取无法正常进行。出现上图所述的问题时,检查环境变量是否具有相同的行列号。

guye322的博客 1万+

一文讲透什么是ADC/DAC中的DDC、DUC、采样率以及数据率等概念

摘要:ADC/DAC中的采样率与数据率概念不同,采样率是转换器的时钟速率,而数据率是数字输出的实际速率。抽取通过滤波降低数据速率,提升信噪比但牺牲带宽;内插则通过插零和滤波提高采样率,将镜像信号移远但增加延迟和功耗。JESD204B标准的高速转换器需平衡通道数与串行速率,内插/抽取技术是关键。文章还解析了DDC、DUC的应用及优缺点,为高速数据转换设计提供参考。(150字)

weixin_49761275的博客 4264

AuthenticationInfo接口

AuthenticationInfo主要是用来获取认证信息的,它实现了Serializable接口,先对其解析如下: 1.获取主题的身份(或者可以理解为用户名,有一个主身份) PrincipalCollection getPrincipals(); 2.获取主题的凭证(或者可以理解为密码) Object getCredentials(); ...

iteye_10899的博客 1642

HQChart实战教程49-点击修改K线颜色及背景色

HQChart实战教程49-点击修改K线颜色及背景色需求效果图步骤1. 注册点击监听事件2. 修改K颜色添加一个自定义颜色的K线klineoption清空所有自定义颜色的K线option交流QQ群: 950092318HQChart代码地址完整例子 需求 对点击的K线修改颜色。 效果图 步骤 1. 注册点击监听事件 事件ID JSCHART_EVENT_ID.ON_CLICK_CHART_PAINT, 注册监听事件见教程 HQChart使用教程5- K线图控件操作函数说明 this.Create=func

小银 2911

Spring BlazeDS Integration 1.5.0 GA(General Availability,即正式版)是一个集成了BlazeDS的Spring框架扩展版本

Spring BlazeDS Integration 1.5.0 GA 是 SpringSource(现为 VMware Tanzu)于2011年左右发布的正式版本,旨在简化 Spring 应用与 Adobe BlazeDS(一个开源的服务器端技术,用于在 Java 后端与 Flex/Flash 前端之间实现高效 AMF(Action Message Format)通信)的集成。该扩展提供了对消息代理、远程调用(Remoting)、消息推送(Messaging)和 HTTP 通道的 Spring 风格配置支

[Blog][Domain] programb.blog.youkuaiyun.com 573

如何在白平衡标定种构建不同类型的白平衡色温坐标系

以各家芯片方案的白平衡色温坐标系为切入点,详细介绍了各家芯片色温坐标系构建的理论依旧;并解析了不同色温坐标系下的物理含义,提提出了多种不同的色温坐标系

大熊 959

数字人(对嘴型 Lip-sync)数据集 LRS2 介绍(含网盘链接)

LRS2(Lip Reading Sentences 2)是牛津大学与BBC合作开发的一个大规模唇语识别数据集,专门用于训练和评估数字人唇语同步(Lip-sync)技术。该数据集包含数千条来自BBC电视节目的口语句子,每个句子长度最多100个字符。官方网站为:https://www.robots.ox.ac.uk/~vgg/data/lip_reading/lrs2.html可惜需要认证,不过我已经下载好并存到网盘里了,有需要可适用如下链接下载。(仅供学习,请勿传播)

iioSnail的博客 1685

Spring BlazeDS Integration Reference Guide

Spring BlazeDS Integration Reference Guide Spring BlazeDS Integration Reference Guide Authors Jeremy Grelle (SpringSource) Version 1.5.2.RELEASE Copies of

arthur.dy.lee的专栏 1525

Flink Gauss CDC:深度剖析存量与增量同步的创新设计

开发Flink Gauss CDC是为了适配华为自研GaussDB的特殊日志格式和逻辑复制机制,解决Flink CDC无法直接支持的问题,同时优化存量与增量同步的效率和一体化读取能力,满足GaussDB复合主键处理、数据落库等定制化需求,以实现高效、准确的数据同步。

数据与算法架构提升之路专栏 1984

基于restful注解(spring4.0.2整合flex+blazeds+spring-mvc)<一>

  摘自: http://www.blogjava.net/liuguly/archive/2014/03/10/410824.html     参考官网:1.http://livedocs.adobe.com/blazeds/1/blazeds_devguide/2.http://docs.spring.io/spring-flex/docs/1.5.2.RELEASE/referenc...

weixin_34121282的博客 235

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

Spring BlazeDS Integration简介与入门

Spring BlazeDS Integration简介与入门 Adobe与Spring共同宣布将联合开发一个新项目:Spring BlazeDS Integration。其目标是:开发者可以利用Spring开发模型通过Adobe Flex、BlazeDS、Spring以及Java技术创建RIA。这样我们就可以通过BlazeDS公开Spring管理的服务而无需额外的配置文 件...

淡定 179

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

**Spring BlazeDS Integration 1.5.0.RC1**(Release Candidate 1)是由 Spring 官方于 **2011年6月1日** 发布的候选版本

Spring BlazeDS Integration(又称 Spring-Flex)是连接 **Spring 后端** 与 **Adobe Flex/AIR 富客户端** 的官方集成框架,通过 AMF 协议实现高效数据通信,将 BlazeDS 的 MessageBroker 完全纳入 Spring 容器管理。

[Blog][Domain] programb.blog.youkuaiyun.com 215

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

spring学习笔记

SpringSpring Framework(core) :包含一系列的IOC容器的设计,提供了依赖反转模式的实现,同时,还integration了AOP功能 还包含了其它基本模块:MVC  JDBC 事务处理模块的实现。Spring Web Flow :建立在spring MVC的基础上的Web工作流引擎。支持JAAX来构建丰富的客户体验,并且提供对JSF的支持Spring  BlazeDS

qq_38767992的博客 197

集成 Flex, Spring, Hibernate 构建应用程序

http://www.ibm.com/developerworks/cn/web/0912_zouxiang_flex_spring/

chaofeipz的专栏 112

Spring Roo开发初评

Spring Roo开发初评

hffyyg的博客 1185
上一篇: mysql数据库导入到powerdisgner建模中(2)
下一篇: 高效程序员的45个习惯:敏捷开发修炼之道
javaheyaolong
博客等级 码龄16年 1粉丝 25原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值