在javax.mail.Session我设置的配置属性中mail.debug=true,但由于某种原因,这不会向应用程序日志添加任何新输出.
我已经将log4f日志记录级别设置为ALL log4j.rootLogger=ALL, stdout,但是......没有.
是否有可能将javax.mail调试输出写入其他地方?听起来不太可能,但我认为值得一提.
我正在努力处理我认为非常简单的事情 - 为一组已经存在的REST服务生成文档,这些服务基本上只是用JAX-RS注释注释的POJO .我使用Jersey作为实现提供者.REST API作为Spring Web应用程序的一部分进行部署.
我想只生成REST服务POJO的文档,所以我的enunciate.xml配置是这样的:
<?xml version="1.0"?>
<enunciate label="novaglobalapi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.25.xsd">
    <api-classes>
        <include pattern="com.something.api.rest.*"/>
    </api-classes>
    <modules>
        <docs docsDir="restapi" title="REST API"/>
    </modules>
</enunciate>
Run Code Online (Sandbox Code Playgroud)
我按照enunciate文档中的建议配置了我的pom.xml:
<build>
...
    <plugin>
        <groupId>org.codehaus.enunciate</groupId>
            <artifactId>maven-enunciate-plugin</artifactId>
            <version>1.25</version>
            <executions>
                <execution>
                    <goals>
                        <goal>docs</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <configFile>enunciate.xml</configFile>
            </configuration>
    </plugin>
...
</build>
Run Code Online (Sandbox Code Playgroud)
但是当我运行时mvn enunciate:docs,我收到以下构建错误:
[ERROR] Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.25:docs (default-cli) on project NovaGlobalSSOAPI: Problem assembling the enunciate app. invalid LOC header (bad signature) -> …Run Code Online (Sandbox Code Playgroud) 目前Enunciate生成REST API文档,但Response Body不包含有关响应的JSON结构的信息.根据我的理解,如果我将类包含在由Jersey to JSON序列化/反序列化的数据实体中,则enunciate将能够生成该文档的那一部分.
数据实体位于不同的模块中,按照发布文档 - 多模块项目中的建议与其源一起打包
...
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <version>2.1.2</version>
    <executions>
        <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
                <goal>jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>
...
Run Code Online (Sandbox Code Playgroud)
这就是我的enunciate.xml的样子:
<?xml version="1.0"?>
<enunciate label="someapi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.25.xsd">
    <api-import pattern="com.something.business.vo.**"/>
    <api-import pattern="com.something.business.domain.**"/>
    <api-classes>
        <include pattern="com.something.web.ssoApi.rest.*"/>
        <include pattern="com.something.business.vo.**"/>
        <include pattern="com.something.business.domain.**"/>
    </api-classes>
</enunciate>
Run Code Online (Sandbox Code Playgroud)
这就是文档的样子:

如您所见,响应主体只包含element: (custom).
如何使其包含响应的JSON结构?
我们在Apple iPad上运行AIR应用程序,偶尔会出现性能突然下降.帧速率从60fps下降到2fps,它永远不会从中恢复.
我们的一些观察是:
renderMode=CPU,但此模式对我们不起作用,因为渲染很难看,特别是在旋转的位图上还有其他人遇到类似的问题吗?任何想法如何解决它?
在处理从JMS收到的Exchange时,我正在动态创建一个从FTP获取文件到文件系统的路由,当批处理完成后,我需要删除相同的路由.以下代码片段显示了我是如何做到这一点的:
public void execute() {
    try {
        context.addRoutes(createFetchIndexRoute(routeId()));
    } catch (Exception e) {
        throw Throwables.propagate(e);
    }
}
private RouteBuilder createFetchIndexRoute(final String routeId) {
    return new RouteBuilder() {
        @Override
        public void configure() throws Exception {
            from("ftp://" + getRemoteQuarterDirectory() +
                "?fileName=" + location.getFileName() +
                "&binary=true" +
                "&localWorkDirectory=" + localWorkDirectory)
                .to("file://" + getLocalQuarterDirectory())
                .process(new Processor() {
                    RouteTerminator terminator;
                    @Override
                    public void process(Exchange exchange) throws Exception {
                        if (camelBatchComplete(exchange)) {
                            terminator = new RouteTerminator(routeId, 
                                    exchange.getContext());
                            terminator.start();
                        }
                    }
                })
                .routeId(routeId);
            }
        };
}
Run Code Online (Sandbox Code Playgroud)
我正在 …
在下面的测试中,我试图模拟以下场景:
但是我的测试失败了,并且消息没有重新传递给新的消费者.我会很感激任何提示.
MessageProcessingFailureAndReprocessingTest.java
@ContextConfiguration(locations="com.prototypo.queue.MessageProcessingFailureAndReprocessingTest$ContextConfig",
        loader=JavaConfigContextLoader.class)
public class MessageProcessingFailureAndReprocessingTest  extends AbstractJUnit4SpringContextTests {
    @Autowired
    private FailureReprocessTestScenario testScenario;
    @Before
    public void setUp() {
        testScenario.start();
    }
    @After
    public void tearDown() throws Exception {
        testScenario.stop();
    }
    @Test public void 
    should_reprocess_task_after_processing_failure() {
        try {
            Thread.sleep(20*1000);
            assertThat(testScenario.succeedingWorker.processedTasks, is(Arrays.asList(new String[]{
                    "task-1",
            })));
        } catch (InterruptedException e) {
            fail();
        }
    }
    @Configurable
    public static class FailureReprocessTestScenario {
        @Autowired
        public BrokerService broker;
        @Autowired
        public MockTaskProducer mockTaskProducer;
        @Autowired
        public FailingWorker failingWorker;
        @Autowired
        public SucceedingWorker succeedingWorker; …Run Code Online (Sandbox Code Playgroud) 我试过在Spring论坛上问这个问题(http://forum.springsource.org/showthread.php?109948-Problem-configuring-spring-security-3.1-with-hybrid-Spring-MVC-Flex-application)但是没有得到回应.
我正在开发一个Web应用程序,它具有内置Flex的(最终用户)用户界面和使用Spring MVC构建的管理用户界面.我正在尝试保护两个接口,并且可以让每个接口单独工作,但不能一起工作.
我正在使用带有Spring Security 3.1RC1和Spring 3.1M1的spring-flex-core 1.5.0的快照构建
<?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"
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-3.1.xsd">
<!-- All Spring Security related configuration goes here -->
<security:global-method-security secured-annotations="enabled" jsr250-annotations="enabled"/>
<security:http pattern="/messagebroker/**" entry-point-ref="entryPoint">
    <security:anonymous enabled="false"/>
</security:http>
<bean id="entryPoint" class="org.springframework.flex.security3.FlexAuthenticationEntryPoint"/>
<security:http pattern="/favicon.ico" security="none"/>
<security:http pattern="/login*" security="none"/>
<security:http pattern="/logoutSuccess*" security="none"/>
<security:http pattern="/apollo/css/**" security="none"/>
<security:http pattern="/apollo/js/**" security="none"/>
<security:http pattern="/apollo/img/**" security="none"/>
<security:http pattern="/common/css/**" security="none"/>
<security:http pattern="/common/js/**" security="none"/>
<security:http pattern="/common/img/**" security="none"/>
<security:http pattern="/MoneyManager.swf" security="none"/>
<security:http pattern="/assets/**" security="none"/>
<security:http pattern="/index.jsp" security="none"/>
<security:http servlet-api-provision="true"> …Run Code Online (Sandbox Code Playgroud) enunciate ×2
java ×2
maven ×2
spring ×2
air ×1
apache-camel ×1
apache-flex ×1
flash ×1
ios4 ×1
ipad ×1
javax.mail ×1
jersey ×1
jms ×1
junit ×1
log4j ×1
spring-jms ×1
spring-mvc ×1