小编oli*_*bur的帖子

Spring3:如何注册我自己的资源前缀/协议

我想为自定义资源前缀编写自己的Resource(来自core.io包)实现,例如"myprotocol:/root/test/foo.properties".

最初的想法是引用JCR存储库中的Apache Sling资源路径来加载一些属性文件,然后PropertyPlaceholderConfigurer可以在Spring应用程序上下文中使用它,例如:

<context:property-placeholder properties-ref="appConfig" ignore-unresolvable="true" />

<bean id="appConfig" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
    <property name="locations">
        <list>
            <value>jcr:/app/test/foo.properties</value>
        </list>
    </property>
</bean>
Run Code Online (Sandbox Code Playgroud)

有没有人知道如何实现这个?

谢谢你的帮助!奥利

resources spring

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

JGit是否支持Git Credentials?

JGit是否支持Git Credentials,如下所示:http://git-scm.com/docs/gitcredentials

我还没有找到任何关于这个主题的内容.

git credentials jgit

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

使用Spring Security玩框架?

我是Play框架的新手,想要为我的webapp实现一些身份验证.

我已经有了一些使用Spring和Spring Security的经验,并希望使用它,但我不确定这是否有意义,因为Spring Security主要用于ServletAPI.

将Play与Spring Security集成是否有意义?

谢谢.

进一步搜索后,我发现这篇文章:

https://groups.google.com/d/msg/play-framework/K7l6vHa0UUA/MYDlsaIfJEMJ

这似乎是可能的,但仍然需要完成很多Play特定的实现(过滤器等).

java spring scala spring-security playframework

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

使用与后期步骤中的 Shell 脚本中的克隆相同的 http git 凭据

我想要自动化我们的发布过程,并且我有一个 Maven 项目的以下 Jenkins 构建作业:

  • 使用配置的 Jenkins 凭证(用户名/密码)克隆 Git 存储库
  • 执行一些 Maven 命令以进行构建
  • 配置一个后步骤来执行一些额外的 Git 命令:合并、标记、推送

如果我运行构建,我在执行Post Step Shell 脚本期间会收到以下错误:

fatal: could not read Username for 'https://mygitserver': Input/output error
Run Code Online (Sandbox Code Playgroud)

Git Repo 服务器使用 HTTP 进行身份验证。

在控制台日志中,我可以看到 Jenkins 使用 .gitcredentials 来处理身份验证:

using .gitcredentials to set credentials
> git config --local credential.username jenkins # timeout=10
> git config --local credential.helper store --file=/tmp/git2442727044778485.credentials # timeout=10
Run Code Online (Sandbox Code Playgroud)

我现在想实际上重用这些凭证存储,因为它们是在构建开始时创建的,但在克隆后再次删除。

这是否可能,或者我是否需要自己使用“凭据绑定插件”等以某种方式处理这个问题?

git shell credentials jenkins

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