我正在开发我的第一个春季安全应用程序.我的applicationContext-security.xml文件如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Namespace-based OpenID configuration
-->
<b:beans xmlns="http://www.springframework.org/schema/security"
xmlns:b="http://www.springframework.org/schema/beans"
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-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
<http>
<intercept-url pattern="/**" access="ROLE_USER"/>
<intercept-url pattern="/index.xhtml*" filters="none"/>
<logout/>
<openid-login login-page="/index.xhtml" authentication-failure-url="/index.xhtml?login_error=true">
<attribute-exchange>
<openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true" count="2"/>
<openid-attribute name="name" type="http://schema.openid.net/namePerson/friendly" />
</attribute-exchange>
</openid-login>
<remember-me token-repository-ref="tokenRepo"/>
</http>
<b:bean id="tokenRepo"
class="org.springframework.security.web.authentication.rememberme.InMemoryTokenRepositoryImpl" />
<authentication-manager alias="authenticationManager"/>
<user-service id="userService">
<user name="http://user.myopenid.com/" authorities="ROLE_SUPERVISOR,ROLE_USER" />
</user-service>
</b:beans>
Run Code Online (Sandbox Code Playgroud)
和Web.xml文件是:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<display-name>Spring Security OpenID Demo Application</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext-security.xml
</param-value>
</context-param>
<context-param> …Run Code Online (Sandbox Code Playgroud) 突然间它停止在设备中构建应用程序.在模拟器中它工作,但当我连接设备并尝试在设备中运行它时,它给我一个错误:
无法构建模块UIKit
我尝试了很多,但无法解决它.
我目前正在使用Nitrous,这应该不重要,但我需要安装摩卡,所以我键入:
npm install - g mocha.
Run Code Online (Sandbox Code Playgroud)
一切安装,当我尝试在命令行中运行mocha时,我收到以下错误:
/home/action/.parts/lib/node_modules/mocha/bin/_mocha:454
if(!files.length)抛出新错误("无法解析路径(或模式)'"错误:无法
在runAgain(/home/action/.parts/)
解析lookupFiles(/home/action/.parts/lib/node_modules/mocha/bin/_mocha:454:32)上的路径(或模式)'test/unit' lib/node_modules/mocha/bin/_mocha:305:24
)
在Object的Array.forEach(native)处.(/home/action/.parts/lib/node_modules/mocha/bin/_mocha:304:6)
在Module._compile(module.js:456:26)
处于Object.Module._extensions..js(module.js: 474:10)
在Module.load(module.js:356:32)
的Function.Module._load(module.js:312:12)
在Function.Module.runMain(module.js:497:10)
启动时( node.js:119:16)
node.js:902:3
有谁知道如何解决这个问题?
我试图在我的MVC网页中查看PDF文档,但我无法使其工作.
我希望PDF显示为页面上其他内容的一部分(页眉,页脚等).目前我有一个显示PDF的解决方案,但在整个页面上.
有没有人这样做过,如果有,那怎么样?
希望我不必在这里重新发明轮子,但有人知道C#中是否有类似于Adobe为AS3提供的将通用对象转换为JSON字符串的类?
例如,当我编码一个对象数组时.
new JSONEncoder(arr).getString();
Run Code Online (Sandbox Code Playgroud)
输出:
[
{"type":"mobile","number":"02-8988-5566"},
{"type":"mobile","number":"02-8988-5566"}
]
Run Code Online (Sandbox Code Playgroud) 我遇到了一些问题的可能答案,但这是关于从Hibernate 3.4.0GA升级到Hibernate 4.1.8的问题.所以这曾经在以前的版本下工作,我已经搜索了为什么它在这个新版本中突破的原因.
我得到了
org.hibernate.TransientObjectException:object引用未保存的瞬态实例 - 在刷新之前保存瞬态实例:com.test.server.domain.model.NoteItem.note - > com.test.server.domain.model.Note
任何帮助都会很棒.
这是我的课程.
@MappedSuperclass
public abstract class EntityBase implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ID")
protected Long id;
@Version
@Column(name = "VERSION")
protected Long version;
public Long getId() {
return id;
}
public Long getVersion() {
return version;
}
protected static final EntityManager entityManager() {
return EntityManagerUtil.getEntityManager();
}
}
@Entity
@Table(name = "WORK_BOOK")
public class WorkBook extends EntityBase {
private static …Run Code Online (Sandbox Code Playgroud) 我正在使用.htaccess并mod_rewrite指向位于DocumentRoot后面的文件.我的文件夹结构如下所示:
home/
webroot/
other_files/
Run Code Online (Sandbox Code Playgroud)
我.htaccess在webroot中有一个文件,其中包含以下内容:
RewriteEngine on RewriteRule ^(.*)$ /home/other_files/$1
如果我尝试访问http://example.com/file.html,则会收到以下错误消息:
在此服务器上找不到请求的URL /home/other_files/file.html.
甚至可以加载DocumentRoot后面的文件吗?如果是这样,有人能指出我正确的方向吗?
我们有关于XML-sig的问题,需要有关可选元素的详细信息以及一些规范化和转换内容.我们正在编写一个非常小的XML语法有效负载的规范,该有效负载将进入媒体文件的元数据,并且需要通过加密签名.而不是重新发明轮子,我们认为我们应该使用XML-SIG规范,但我认为大部分是矫枉过正我们所需要的,所以我们希望与谁知道详情的人更多信息/对话.
具体来说,如果XML是非常基本的,没有用于格式化的选项卡并且特定于我们的需求,我们是否需要关注转换或规范化?
我想在用户在Visual Studio 2010\2012中创建project\solution时添加功能.即我需要在创建新项目时执行C#代码.
我搜索了很多但是在项目创建后没有发现任何在\上触发的事件.
有没有办法做到这一点?
c# events visual-studio-addins envdte visual-studio-templates
我正在尝试使用"Value"属性创建自定义操作,我想将参数传递给C#代码(TARGETDIR和版本).
但是,我收到一条错误,指出DLLENtry和Value不能共存.但是没有dllentry的自定义操作无效.
这是代码:
<CustomAction Id="SetMAWPrefferences"
Value="InstallDir=[TARGETDIR];Version=2.0.0.1"
Return="check"
Execute="commit"
BinaryKey="ImportExportBinary"
/>
Run Code Online (Sandbox Code Playgroud)
为此它我得到这个错误:
错误9 ICE68:操作'SetMAWPrefferences'的自定义操作类型无效.
有什么想法怎么做?