Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 org.nutz.resource.Scans 覆盖问题 #1227

Closed
shevawen opened this issue Mar 6, 2017 · 2 comments
Closed

关于 org.nutz.resource.Scans 覆盖问题 #1227

shevawen opened this issue Mar 6, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@shevawen
Copy link
Contributor

shevawen commented Mar 6, 2017

现在 org.nutz.resource.Scans 会自动替换相同的资源

org.nutz.resource.Scans - same resource path [config.properties](/path/conf/config.properties) will be override by [config.p
roperties](/path/lib/name-of-jar.jar:config.properties)

但我想根据启动时classpath设置的顺序让资源生效。

@wendal
Copy link
Member

wendal commented Mar 7, 2017

关联 #820

@wendal wendal added this to the 1.r.61 milestone Mar 7, 2017
@wendal wendal added the 重要 label Mar 7, 2017
@wendal wendal self-assigned this Mar 7, 2017
@wendal wendal closed this as completed in cc4af12 Mar 7, 2017
@wendal
Copy link
Member

wendal commented Mar 7, 2017

通过定义资源的优先级来解决

Jar内资源 < 默认优先级 < 文件资源

最终得到的List列表, 会是这样:

[Jar内资源A, Jar内资源B........... 文件资源A, 文件资源B]

这样的排序,确保了文件资源总是比Jar内资源后加载,从而实现覆盖.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants