configuration-files

How to update external config files without rebuilding war file in Grails

只谈情不闲聊 提交于 2019-11-30 09:58:45
How to update external config files (e.g.: config-ex.groovy , config-ex.properties ) without rebuilding the war file in Grails? Restarting the application server will apply the new updates from external config files. If I understand well you want to externalized Grails config outside the war. You can define an external config in your config.groovy like this grails.config.locations = ["file:path/to/your/Configfile.groovy"] See the Grails doc 4.4 Externalized Configuration Define your external Grails config with: grails.config.locations = ["file:some/path/to/Config.groovy"] Then to reload them

Nginx Yii2 configuration in different folders

≯℡__Kan透↙ 提交于 2019-11-30 09:43:06
问题 I faced with problem in configuring nginx server for yii2 basic app. Here is my service block file : server { listen 80 ; access_log /var/log/nginx/access-server.log; error_log /var/log/nginx/error-server.log; charset utf-8; location /fetch { root /usr/share/nginx/html/another_folder/web/; try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document

vim cant map <C-Tab> to :tabnext

家住魔仙堡 提交于 2019-11-30 09:23:09
I have the following mappings in my .vimrc: map <C-S-Tab> :tabprevious<CR> nmap <C-S-Tab> :tabprevious<CR> imap <C-S-Tab> <Esc>:tabprevious<CR>i map <C-Tab> :tabnext<CR> nmap <C-Tab> :tabnext<CR> imap <C-Tab> <Esc>:tabnext<CR>i I want to switch the tabs with Strg+Tab forward and with Strg+Shift+Tab backward. Why does this mapping not work? nfm Are you using xterm ? If so, you can't map ctrl-tab without a lot of hackery. xterm and many other terminal emulators don't recognise ctrl-tab and simply send a tab character. See my answer here for more details: Mapping <C-Tab> in my vimrc fails in

Location to put user configuration files in windows

二次信任 提交于 2019-11-30 09:17:07
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 is annoying to develop and not portable with the *nix config files) I currently am dumping the files

How to use the global.php/local.php configs in the getConfig() of a module in a Zend Framework 2 application?

那年仲夏 提交于 2019-11-30 07:44:20
In a ZF2 application I have some cofigs, that: 1. need to be different dependening on the environment; 2. are specific for a concrete module. I'm curently using it like here described: global.php & local.php return array( ... 'modules' => array( 'Cache' => array( 'ttl' => 1, // 1 second ) ) ... ); Module class Module { ... public function getServiceConfig() { try { return array ( 'factories' => array( 'Zend\Cache\Adapter\MemcachedOptions' => function ($serviceManager) { return new MemcachedOptions(array( 'ttl' => $this->getConfig()['modules']['Cache']['ttl'], ... )); }, ... ) ); } ... } ... }

How do I turn logging off using log4j?

女生的网名这么多〃 提交于 2019-11-30 07:02:41
I am using a third-party library which has a log4j.xml configuration - what's the best way to turn off the logging? I think all that is required is to set the threshold parameter to OFF <log4j:configuration threshold="OFF"> <root> <priority value ="off" /> <appender-ref ref="console" /> <appender-ref ref="rolling-file" /> </root> </log4j:configuration> Or directly from code: Logger.getRootLogger().removeAllAppenders(); Depends on configuration. Try something like: <log4j:configuration> <root> <priority value ="off" /> <appender-ref ref="console" /> <appender-ref ref="rolling-file" /> </root> <

Custom Behavior won't register in my web.config

吃可爱长大的小学妹 提交于 2019-11-30 06:43:07
问题 I have a working application using Json.NET (newtonsoft) as a custom serializer. Currently I'm adding this derivative of WebHttpBehavior in a custom WebServiceHostFactory. See the code snippet at the end of this blog for how I've attached it. As I'm hosting this service in IIS, I would like to get rid of my custom hosting code and simply add the custom behavior to my web.config. The procedure is shown in this msdn article. So I try to do that like so: <behaviors> <endpointBehaviors> <behavior

Dynamically loading properties file using Spring

我们两清 提交于 2019-11-30 05:52:55
问题 I have written a PropertyUtils class (from internet), which will load the Properties <bean id="propertiesUtil" class="com.myApp.PropertiesUtil" > <property name="locations"> <list> <value>classpath:myApp/myApp.properties</value> </list> </property> </bean> and a PropertiesUtil class is like below public class PropertiesUtil extends PropertyPlaceholderConfigurer { private static Map<String, String> properties = new HashMap<String, String>(); @Override protected void loadProperties(final

Pyramid and .ini configuration

孤人 提交于 2019-11-30 04:56:23
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 name" blog.comments_enabled = true ... Or is it better to have a separate .ini file and parse it during

How to create a WCF client without settings in config file?

早过忘川 提交于 2019-11-30 01:53:35
问题 I just start work on WCF a month ago. Please forgive me if I ask something already answered. I try to search first but found nothing. I read this article, WCF File Transfer: Streaming & Chunking Channel Hosted In IIS. It works great. Now I like to integrate client side code to be part of my application, which is a dll running inside AutoCAD. If I want to work with config file, I have to change acad.exe.config which I don't think is a good idea. So I think if it possible, I want to move all