小编Pav*_*ral的帖子

Eclipse - 查找没有附加源的库的Java引用

环境

我有一个test-foo.jar只有两个文件的简单库:

  • 接口Foo用一种方法void doStuff()
  • Bar使用单个方法的类void executeFoo(Foo foo),只需调用foo.doStuff()

然后我有Eclipse Java项目,FooImpl它有一个实现的类Foo.该项目具有test-foo.jar构建路径条目.我没有附加此JAR的源代码.

Eclipse项目树

问题

现在让我说我对谁实际调用doStuff()方法有点好奇.所以我点击FooImpl#doStuff签名并按Ctrl+ Shift+ G(找到参考).我希望Bar#executeFoo在搜索结果中看到,但结果实际上是空的.

清空搜索结果

问题

我有点困惑,因为我认为这在Eclipse中有效(现在已经使用Eclipse了几年).但它似乎只适用于附带源代码的图书馆(我之前没有注意到).

有没有办法在没有附加源的情况下在项目库中查找类型(或方法)的引用(或用法)?为什么Eclipse没有索引并显示.class文件中的引用?


附加信息:

  • 一旦我将源代码附加到JAR,查找引用就会起作用.
  • 我很想知道为什么Eclipse JDT开发人员决定不在没有源的情况下索引搜索 .class.
  • 请注意,即使我没有源代码,知道谁调用我的方法也是非常有用的信息.
  • 在我看来,Eclipse的是索引方法的引用.class文件.
  • 顺便说一句,NetBeans"也不起作用";).

java eclipse eclipse-jdt

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

我应该使用什么元标记来表示网站(不是内容)作者?

问题:

在HTML中,您可以使用author元标记(或DC创建者)来指示某人是信息的作者(即内容).但是,我希望能够在meta标签中将自己签名为Web应用程序开发人员.

大多数人(在我看来)滥用authorWeb应用程序开发者的签名元标记.例如,当您开发博客应用程序时,作者应该是文章编写者,而不是应用程序开发人员.但应用程序开发人员的名称仍然是有用的元信息.

我认为常用的元标记集是不完整的,因为它没有为这种信息提供元标记.我是对的,还是我错过了什么?你会建议什么?


其他想法:

数字出版中的元标记密切关注纸质出版和图书馆中使用的元模型.该组的都柏林核心元素可能是好例子.如果我们使用这个类比,那么出版商可能就是我想要的.不过,我觉得事实并非如此.发布者可能不是Web开发人员.你能找到与纸张世界更好的类比吗?

html metadata meta-tags

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

属性'configurationClass'不可写或具有无效的setter方法.是setter的参数类型

<?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:jee="http://www.springframework.org/schema/jee"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/util
            http://www.springframework.org/schema/util/spring-util-3.0.xsd
            http://www.springframework.org/schema/context 
            http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/jee 
            http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">

        <util:properties id="hibernateProperties" location="classpath:hibernate.properties" />

        <bean id="usermanagementSessionFactory"
            class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
            <property name="dataSource" ref="usermanagementDataSource" />
            <property name="configLocation" value="classpath:hibernate.cfg.xml" />
            <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />
            <property name="hibernateProperties" ref="hibernateProperties" />
        </bean>

        <jee:jndi-lookup id="usermanagementDataSource" jndi-name="java:jboss/datasources/usermanagementDS" />

        <bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager"
            init-method="init" destroy-method="close">
            <property name="forceShutdown" value="false" />
            <property name ="startupTransactionService" value="true"/>
        </bean>

        <bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp">
            <property name="transactionTimeout" value="30" />
        </bean>

        <bean id="transactionManager"
            class="org.springframework.transaction.jta.JtaTransactionManager">
            <property name="transactionManager" ref="atomikosTransactionManager" />
            <property name="userTransaction" ref="atomikosUserTransaction" />
        </bean>

        <bean …
Run Code Online (Sandbox Code Playgroud)

spring hibernate maven

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

没有SockJS的RabbitMQ Web STOMP

是否可以在没有SockJS库的情况下设置RabbitMQ Web STOMP连接?

rabbitmq-web-stomp由于服务器生成的初始响应Welcome to SockJS!(显然不是基于STOMP的消息),我已经玩了插件而没有成功.

SockJS真的需要吗?它为游戏带来了什么(除了传统的浏览器支持)?

stomp rabbitmq websocket

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

没有定义名为'springSecurityFilterChain'的bean - Spring Security 3.1

我谷歌很多,发现很多关于这个问题的问题,但没有解决方案解决了我的问题.如果有人可以解决我的问题

在web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0" metadata-complete="true">

<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>

<filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>


<filter>
    <filter-name>encoding-filter</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
        <param-name>encoding</param-name>
        <param-value>UTF-8</param-value>
    </init-param>
</filter>


<filter-mapping>
    <filter-name>encoding-filter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>



<!-- Processes application requests -->
<servlet>
    <servlet-name>appServlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring/appServlet/servlet-context.xml,/WEB-INF/spring/appServlet/security-context.xml,/WEB-INF/hibernate/hibernate-config.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>appServlet</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud)

安全的context.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:security="http://www.springframework.org/schema/security" …
Run Code Online (Sandbox Code Playgroud)

security spring

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