Tag: 概况

Cabal在需要分析库时不安装依赖关系?

我想用分析来编译我的程序,所以我运行: $ cabal configure –enable-executable-profiling … $ cabal build … Could not find module 'Graphics.UI.GLUT': Perhaps you havent installed the profiling libraries for package 'GLUT-2.2.2.0'? … $ # indeed I have not installed the prof libs for GLUT, so.. $ cabal install -p GLUT –reinstall … Could not find module 'Graphics.Rendering.OpenGL': Perhaps you havent installed […]

如何通过一个合适的文件来设置活动的spring 3.1环境configuration文件,而不是通过envvariables或系统属性

我们使用Spring 3.1的新环境configuration文件function。 我们目前通过在部署应用程序的服务器上设置环境variablesspring.profiles.active = xxxxx来设置活动configuration文件。 我们认为这是一个不太理想的解决scheme,因为我们想要部署的war文件应该只有一个额外的属性文件,它设置了spring应用程序上下文应该加载的环境,因此部署不依赖于服务器上的一些env var集合。 我试图找出如何做到这一点,发现: ConfigurableEnvironment.setActiveProfiles() 我可以使用它来以编程方式设置configuration文件,但我仍然不知道何时何地执行此代码。 某处弹簧环境加载? 我可以加载我想传递给属性文件的方法参数? 更新:我刚刚发现在我可能能够实现设置活动configuration文件的文档?