小编use*_*973的帖子

匹配的通配符是严格的,但是没有找到元素'bean'的声明

我正在尝试通过配置CAS客户端将Spring Security项目与CAS服务器集成以进行身份​​验证.在将它应用到我的Web应用程序之前,我尝试了它到Spring Security示例项目.

我添加了CAS插件,如下所示https://wiki.jasig.org/display/CASC/Configuring+the+JA-SIG+CAS+Client+for+Java+using+Spring 使其适应案例.

当我运行或调试示例Web应用程序时,我收到了我在标题上提到的错误,该错误被引用到该行

 <bean id="springSecurityFilterChain" class="org.springframework.security.web.FilterChainProxy">
Run Code Online (Sandbox Code Playgroud)

以下spring-security.xml:

 <beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
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.2.xsd
   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">

<!-- enable use-expressions -->
<http auto-config="true" use-expressions="true">
    <intercept-url pattern="/admin**" access="hasRole('ROLE_ADMIN')" />

    <!-- access denied page -->
    <access-denied-handler error-page="/403" />
    <form-login 
        login-page="/login" 
        default-target-url="/welcome" 
        authentication-failure-url="/login?error" 
        username-parameter="username"
        password-parameter="password" />
    <logout logout-success-url="/login?logout"  />
    <!-- enable csrf protection -->
    <csrf/>
</http>

<!-- Select users and user_roles from database -->
<authentication-manager>
    <authentication-provider>
        <jdbc-user-service id="userService" data-source-ref="dataSource"
            users-by-username-query=
                "select username,password, enabled from users where username=?"
            authorities-by-username-query= …
Run Code Online (Sandbox Code Playgroud)

java spring cas spring-security

5
推荐指数
1
解决办法
6639
查看次数

JQuery - On Click image打开单独的窗口

当用户点击缩略图时,我试图在新选项卡中打开图像,但即使我尝试了许多不同的解决方案,但它们都没有奏效.

我发布jquery代码:

$('#imagelink').click(function() {

     //location.href = $('#imagelink').attr("href"); //It is correct!
    // window.location.href = this.id + '.html'; //It is correct!
  //  window.open($('#imagelink').attr("href"), '_blank');
  //  $.winOpen($('#imagelink').attr("href"), "windowName", { fullscreen: "no", height: "600px", toolbar:    1, width: 600 }); //It is correct!
     window.location = $.myURL("index", $(this).attr("href"));//It is correct!

    });
Run Code Online (Sandbox Code Playgroud)

正如你所看到的,我已经尝试了以上五个方面的所有方面,所有这些都在同一个标​​签中打开图像,这不是我想要的.

我也发布了包含html的jquery代码(这包含在单独的文件中):

new_span.append('<a id="imagelink" href="'+ new.link +'"><img src="' + new.url +'" height=50px width="50px"  /></a>');
Run Code Online (Sandbox Code Playgroud)

任何形式的帮助表示赞赏.

jquery onclick

4
推荐指数
1
解决办法
2万
查看次数

从BitBucket下载 - 授权失败

我想从bitbucket下载我的项目的旧版本到我的ubuntu服务器.

我正在输入以下命令

sudo wget https://bitbucket.org/owner/projectname/get/versionId.tar.gz
Run Code Online (Sandbox Code Playgroud)

但我收到了消息

401 UNAUTHORIZED - Authentication failed
Run Code Online (Sandbox Code Playgroud)

我还该怎么办?谢谢.

ubuntu bitbucket

3
推荐指数
1
解决办法
1849
查看次数

如何检索DBpedia资源的摘要?

我需要找到他们的摘要包含特定单词的所有DBpedia类别和文章.我知道如何编写查询标签的SPARQL查询,如下所示:

SELECT ?uri ?txt  WHERE {
  ?uri rdfs:label ?txt .
  ?txt bif:contains "Machine" .
}
Run Code Online (Sandbox Code Playgroud)

但我还没想出如何搜索摘要.我尝试了以下但似乎不正确.

SELECT ?uri ?txt  WHERE {
  ?uri owl:abstract ?txt .
  ?txt bif:contains "Machine" .
}
Run Code Online (Sandbox Code Playgroud)

如何检索摘要以查询其文本?

sparql dbpedia

1
推荐指数
1
解决办法
940
查看次数

错误:无法实例化bean类 - 找不到默认构造函数;

我试图通过Spring和Java Persistence API在我的数据库中持久化Test类型的对象

我的数据库中有一个Test表,我创建了相应的Entity Class:

   @Entity
   @Table(name = "test")
   @XmlRootElement
   @NamedQueries({
   @NamedQuery(name = "Test2.findAll", query = "SELECT t FROM Test t"),
   @NamedQuery(name = "Test2.findByTestId", query = "SELECT t FROM Test t WHERE t.testId = :testId"),
   @NamedQuery(name = "Test2.findByTestint", query = "SELECT t FROM Test t WHERE t.testint = :testint"),
   @NamedQuery(name = "Test2.findByText", query = "SELECT t FROM Test t WHERE t.text = :text")})

public class Test implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY) …
Run Code Online (Sandbox Code Playgroud)

java spring hibernate jpa

-2
推荐指数
1
解决办法
1万
查看次数

标签 统计

java ×2

spring ×2

bitbucket ×1

cas ×1

dbpedia ×1

hibernate ×1

jpa ×1

jquery ×1

onclick ×1

sparql ×1

spring-security ×1

ubuntu ×1