configuration-files

Global variables And Application Variables Defining in Spring boot project

。_饼干妹妹 提交于 2019-12-18 18:04:29
问题 I am trying to develop micro service by using spring and spring boot. In my project , I am converting monolithic to service oriented architecture. Project contain 20 Micro services.I these I need to set application variables and global variables. I have confusions related to this , And I am adding those confusions here, Is possible to declare my global variables in application.properties file? If not possible where I can define my global variables? If I am using spring config server for

Location to put user configuration files in windows

余生长醉 提交于 2019-12-18 13:17:42
问题 I'm writing a python library that has a per-user configuration file that can be edited by the user of the library. The library also generates logging files. On *nix, the standard seems to be to dump them in $HOME/.library_name. However, I am not sure what to do with Windows users. I've used windows for years before switching to Linux and it seems that applications tended to either A) rely on GUI configuration (which I'd rather not develop) or B) dump configuration data in the registry (which

Pyramid and .ini configuration

浪子不回头ぞ 提交于 2019-12-18 11:49:27
问题 Each Pyramid application has an associated .ini file that contains its settings. For example, a default might look like: [app:main] use = egg:MyProject pyramid.reload_templates = true pyramid.debug_authorization = false pyramid.debug_notfound = false pyramid.debug_routematch = false ... I am wondering if it is possible to add your own configuration values in there, and read them at run-time (mostly from a view callable). For instance, I might want to have [app:main] blog.title = "Custom blog

Where do I put my XML beans in a Spring Boot application?

我们两清 提交于 2019-12-18 10:27:46
问题 I'm getting back into Spring (currently v4). It's all wonderful now with @SpringBootApplication and the other annotations but all the documentation seems to forget to mention how I define other beans in XML! For example I'd like to create an "SFTP Session Factory" as defined at: http://docs.spring.io/spring-integration/reference/html/sftp.html There is a nice bit of XML to define the bean but where on earth do I put it and how do I link it in? Previously I did a: ApplicationContext context =

How to locate the vimrc file used by vim editor?

送分小仙女□ 提交于 2019-12-18 09:56:31
问题 Is there a command in the vim editor to find the .vimrc file location? 回答1: Just try doing the following: :version You will get an output which includes something like: system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" system menu file: "$VIMRUNTIME/menu.vim" As noted by Herbert in comments, this is where vim looks for vimrc s, it doesn't mean they exist. You can check the full path

Which is the best way to allow configuration options be overridden at the command line in Python?

那年仲夏 提交于 2019-12-18 09:54:12
问题 I have a Python application which needs quite a few (~30) configuration parameters. Up to now, I used the OptionParser class to define default values in the app itself, with the possibility to change individual parameters at the command line when invoking the application. Now I would like to use 'proper' configuration files, for example from the ConfigParser class. At the same time, users should still be able to change individual parameters at the command line. I was wondering if there is any

Reading connection string from external config file

我们两清 提交于 2019-12-18 04:40:34
问题 I have created a console application and an app.config file and Connections.config file. The app.config file has a connectionstring property source pointing to the Connections.config When I tried to read the connection string in the application, I get a ConfigurationErrorException This is my main method. static void Main(string[] args) { var settings = ConfigurationManager.ConnectionStrings; if (settings != null) { foreach (ConnectionStringSettings setting in settings) { Console.WriteLine

What use has the default (assembly).dll.config file for .NET-Assemblies?

六月ゝ 毕业季﹏ 提交于 2019-12-18 03:14:30
问题 I have a question regarding AppSettings in C#. First I´ll describe my situation. My solution consists of an executable program program.exe and an assembly.dll . The program references the assembly and works with it. The assembly-project has application settings set up with the Visual Studio project settings manager. Now when I compile my solution in my assembly\bin\release folder there is an assembly.dll.config file which contains the settings I have set up earlier. Now the thing I don´t

Azure configuration settings and Microsoft.WindowsAzure.CloudConfigurationManager

北城以北 提交于 2019-12-17 20:03:50
问题 Apparently Microsoft.WindowsAzure.CloudConfigurationManager.GetSettings will start by looking in ServiceConfiguration.*.cscfg and then fall back to web.config and app.config. But - what format should this be in web/app .config? E.g. to get Microsoft.WindowsAzure.CloudConfigurationManager.GetSettings("Foo") to pick up from app.config what would the XML look like? 回答1: It will just be an appSettings key/value. <configuration> <appSettings> <add key="Foo" value="AzureSetting"/> </appSettings> <

How to Write to a User.Config file through ConfigurationManager?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 18:54:48
问题 I'm trying to persist user settings to a configuration file using ConfigurationManager. I want to scope these settings to the user only, because application changes can't be saved on Vista/Win 7 without admin privileges. This seems to get me the user's configuration, which appears to be saved here in Win 7 ([Drive]:\Users\[Username]\AppData\Local\[ApplicationName]\[AssemblyName][hash]\[Version\) Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel