最近的帖子,如何在Play Framework 2.0中使用Evolutions?,表示在运行Play 2.0时将自动应用演进.我已经尝试过play-2.0-beta下载和最新的git代码,我没有看到这种行为.事实上,我找不到任何方法来应用生产模式的演变.我错过了什么吗?
在Play 1中,我可以编写一个扩展PlayPlugin的类,并执行以下操作:
@Override
public void onConfigurationRead() {
Play.configuration.put("logger.application","DEBUG");
}
Run Code Online (Sandbox Code Playgroud)
我没有看到如何在Play 2中执行等效操作.Plugin接口不再具有"on ConfigurationRead"方法.我不确定在onApplicationStart中执行此操作是否安全,即使是这样,我也没有看到如何修改Scala中的Play.configuration对象.
我想设置我的构建,如果我们的nexus服务器无法访问,它会自动尝试从maven中心下载工件.我在settings.xml中有以下内容,我不知道如何更改它(如果可能的话).
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://mynexus</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://mynexus</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
Run Code Online (Sandbox Code Playgroud)