Grails: can not generate all files for domain class
Sometimes, you will find grails can’t generate all files for your domain class with the following error message:
No domain class found for name DOMAIN. Please try again and enter a valid domain class name
This is a bug of grails. Once your IDE compiled your domain class, then grails can’t generate-all any more.
One of solutions is just remove the compiled domain class, then run ‘generate-all’ again.
Categorized in: Scripts · Tagged with: grails, Groovy
VIM 如何切换 buffers
命令 ls 可查看当前已打开的buffers
命令 b num 可切换buffer (num为buffer list中的编号)
其它命令:
:bn — buffer列表中下一个 buffer
:bp — buffer列表中前一个 buffer
:b# — 你之前所在的前一个 buffer
Categorized in: Operation Systems · Tagged with: VIM
缺省策略实现和策略文件语法 – prewind
本文来自:http://blog.chinaunix.net/u/5834/showart.php?id=224348
English Version: Default Policy Implementation and Policy File Syntax
上次修改时间: 1998 年 10 月 30 日
Java 应用程序环境的策略(对不同来源的代码指定权限)由 Policy 对象来表示。更明确地说,就是由 Policy 类(包含在 java.security 包中)的实现抽象方法的 Policy 子类来表示。
Policy 对象所用策略信息的源位置由 Policy 实现决定。缺省 Policy 实现从静态策略配置文件获得自己的信息。本文档的其余部分叙述了缺省 Policy 实现及其所读取的策略文件中必须使用的语法。有关使用 Policy Tool 来创建策略文件(不必知道所需语法)的详细信息,请参阅《策略工具文档》 (for Solaris) (for Windows)。
以下是本文档其余部分的概要:
缺省 Policy 实现
缺省策略文件位置
更改 Policy 实现
策略文件语法
策略文件示例
策略文件中的属性扩展
相关文档
Categorized in: Java · Tagged with: JAAS, Java, JDK
JavaTM 认证和授权服务 (JAAS) 参考指南 – JDK6
原文:JAAS Reference Guide
译文:JAAS Reference Guide
译者:javafuns
Who Should Read This Document
Related Documentation
What’s New in JAAS in the J2SDK 1.4
Subject
Principals
Credentials
Authentication Classes and Interfaces
LoginContext
LoginModule
CallbackHandler
Callback
Policy
AuthPermission
PrivateCredentialPermission
JAAS Tutorials and Sample Programs
Appendix A: JAAS Settings in the java.security Security Properties File
Appendix B: Example Login Configurations
Introduction
JavaTM 认证和授权服务 (JAAS) 作为一个可选包(扩展)被引入到 JavaTM 2 SDK, Standard Edition (J2SDK), v 1.3. JAAS 已经被集成到 J2SDK 1.4.
JAAS 可用于两个目的:
- 用于用户认证, 可靠且安全地确认是谁正在执行 Java 代码, 不管是否代码是由一个应用程序, 一个 applet, 一个bean, 或者一个 servlet 运行的;
- 用于用户授权, 确保他们对要执行的动作具有所必需的访问权利(权限).
JAAS 实现了 Java 版本的标准 Pluggable Authentication Module (PAM) framework. 请看 Making Login Services Independent from Authentication Technologies 以获得更多信息.
传统上, Java 已经提供了基于代码源(codesource-based)的访问控制 (访问控制是基于代码起源于何处, 谁对该代码进行了签名). 但是, 它缺少另外的基于谁运行代码 来执行访问控制的能力. JAAS 提供了一个框架增强 Java security architecture 使之具有该能力.
Read more »
Categorized in: Java · Tagged with: JAAS, Java, JDK
Install a simple SVN Server yourself
Frankly speaking, i haven’t constructed such an svn server before.
After searhing and getting help from Internet, I finished this target this morning by the following steps:
1). Download SVN server file and unzip to anywhere you prefer.
The file i used is the latest version: svn-win32-1.5.6.zip
2). Add its bin directry into PATH environment veriable
Once finished, type ’svn’ command in DOS or terminal to test the installation and settings.
3). Now, let’s create a new project
svnadmin create D:\repository\myproject
4). Configure our new project
After myproject was created successfully, you will find several files and folders created in it.
In conf folder, there are three files – authz, passwd, svnserve.conf – listing.
– svnserve.conf: the main entry for your project configuration.
In general section, set:
anon-access = none ## anonymous users are not allowed to access
auth-access = write ## authenticated users have write privilege.
password-db = passwd ## use the default password file, i.e. passwd file
authz-db = authz ## use the default authorization file, i.e. authz file
realm = myproject ## which realm to be protected. Here is our new project, i.e. myproject
–passwd: the user accounts are stored here
We will add two users for demonstration, harry and sally. You can just uncomment the existing lines.
harry = harryssecret ## harry is the user login name, harryssecret is his password.
sally = sallyssecret
–authz: authorization for the users
We make harry become a developer, sally is an observer only.
[groups]
developers = harry
Then we grant the permissions for them.
[myproject:/]
@developers = rw
sally= r
5). Now, the configuration was finished, so lets start the svn server
svnserve -d -r D:\repository --listen-port 9000
6). Check out our new project
svn co svn://ip|host:9000/myproject myproject --username harry --password harryssecret
You can also make svn server as a windows service:
sc create svn binpath= "[yoursvnfolder]\bin\svnserve.exe --service -r D:\repository --listen-port 9000" displayname= "Subvsersion Server Service" depend= Tcpip start= auto
If you want to reconfigure:
sc config svn binpath= "[yoursvnfolder]\bin\svnserve.exe --service -r D:\repository --listen-port 9000" displayname= "Subvsersion Server Service" depend= Tcpip start= auto
Note: There is a space after each ‘=’ symbol.
P.S. svn server can be integrated with http server wonderfully, so that all svn files can be accessed via http protocol. But this is out of the scope of my article, because I already said I just want a simple svn server
.
Categorized in: Uncategorized · Tagged with: SVN
Java 安全性 – 认证与授权
原文地址:http://www.ibm.com/developerworks/cn/views/java/tutorials.jsp?cv_doc_id=84887
关于作者
Brad Rubin 是 Brad Rubin & Associates Inc. 的负责人,该公司是一家专门从事无线网络与 Java 应用程序安全性和教育的计算机安全性咨询公司。Brad 在 IBM(位于明尼苏达州的 Rochester)工作了 14 年,从 AS/400 的第一个发行版开始, 就从事它的硬件和软件所有方面的开发。他是促使 IBM 转向支持 Java 平台的关键人物,并且是 IBM 最大的 Java 应用程序(称为 SanFrancisco (现在是 WebSphere 的一部分) 的商业应用程序框架产品)的首席架构设计师。他还是 Imation Corp. 数据存储部门(Data Storage Division)的首席技术官, 还是其研发组织的领导。
Brad 拥有计算机和电子工程学位,以及威斯康星大学麦迪逊分校计算机科学博士头衔。 他目前在明尼苏达大学教授电子和计算机工程高级设计(Senior Design)课程,并将于 2002 年秋季开发和教授该大学的计算机安全性(Computer Security)课程。可以通过 BradRubin@BradRubin.com 与 Brad 联系。
工具、代码样本和安装需求
JAAS 本来是 Java 2 平台标准版的扩展。然而,最近已将它添加到版本 1.4 中。要完成本教程,需要下列各项:
- JDK 1.4,标准版
- 教程源代码和类,以便您可以跟上我们的进度并理解示例。
- 支持 Java 1.4 插件的浏览器。
可以使用 JDK 1.3.x,但您必须自行安装 JCE 和 JSSE。
认证与授权
认证是用户或计算设备用来验证身份的过程。授权是根据请求用户的身份允许访问和操作一段敏感软件的过程。 这两个概念密不可分。没有授权, 就无需知道用户的身份。没能认证,就不可能区分可信和不可信用户, 更不可能安全地授权访问许多系统部分。
不一定要标识或认证个别实体;在某些情况下,可以通过分组,对给定组中的所有实体授予某种权限来进行认证。 在某些情况下,个别认证是系统安全性必不可少的环节。
认证与授权的另一个有趣方面是,一个实体在系统中可以有几个角色。 例如,用户可以同时是公司职工(表示他需要对公司的电子邮件有访问权)和该公司的会计师(表示他需要对公司财务系统有访问权)。 Read more »
Categorized in: Java · Tagged with: Java
JAAS 身份验证技术入门 – IBM
只介绍了 JAAS 中 authentication 部分,原文地址:http://www.ibm.com/developerworks/cn/offers/lp/demos/summary/jaas.html
JAAS 身份验证技术入门, 浏览器需有 Flash Player 支持.
Categorized in: Java · Tagged with: Java
How to add a dictionary for your blog readers?
将如下代码加到你的blog中即可:
<script src=”http://dict.cn/hc/” type=”text/javascript”></script>
如果要关闭取词功能,加入下代码:
[<a href="javascript:dictEnable()" id="huaci0_status">划词已关</a>]
or
<a href=”javascript:dictDisable()” id=”huaci0_status”>划词已开</a>
Categorized in: Scripts · Tagged with: Wordpress

(
(4.00 out of 5)