properties-file

Unable to set a WiX Property equal to a Property from a Properties file

吃可爱长大的小学妹 提交于 2019-12-24 00:44:27
问题 I might be suffering from a case of Sometimers Disease, but I could have sworn the last time I dipped my toe in WiX, it was recommended to have a seperate file for setting properties to be referenced later if any of those properties aren't meant to be static. Basically, updating them before the build sequence begins as-needed. So basically, I'm trying to: Load the Properties file into the WiX project (done) Create a WiX Property equal to one of the properties from that Properties file

java.io.FileNotFoundException: class path resource [WEB-INF/classes/library.properties] cannot be opened because it does not exist

*爱你&永不变心* 提交于 2019-12-23 14:55:24
问题 In my Spring application, I have a simple properties file located in folder WEB-INF\classes so that it, the DispatcherServlet and various other config files are in the classpath . The props file is defined in the DispatcherServlet as: <bean id="propertiesFactory" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="location"> <value>/WEB-INF/classes/library.properties</value> </property> </bean> The propertiesFactory bean is injected into a controller:

Special characters (“\”) in .properties-file

醉酒当歌 提交于 2019-12-23 13:27:42
问题 I'm developing a Java application that executes on Windows. I have several backslashes ("\") in a .properties-file. This is what the file looks like: dir=\\127.0.0.1\d$\dir\dir2\dir3 I read the property dir using Spring annotation Value : @Value("${dir}") protected String dir; This results in the string 127.0.0.1d$dirdir2dir3 when the property dir is used in the code. I have tried unicode escapes like this: dir=\u005C\u005C127.0.0.1\u005Cd$\u005Cdir\u005Cdir2\u005Cdir3 I have also tried

refresh property placeholder mechanism at Spring

 ̄綄美尐妖づ 提交于 2019-12-23 01:54:39
问题 I have a Spring context xml file and a specific bean into it that created by a PropertyPlaceholderConfigurer mechanism. My problem is: When the application is working related properties file changes and I don't want restart application. I want reload related bean without restart application. What is best solution for my goal? 回答1: you can have a look at ReloadablePropertiesAnnotation on github https://github.com/jamesemorgan/ReloadablePropertiesAnnotation this should just work by annotating

How to configure the log4j output file path in web.xml and log4j.properties?

怎甘沉沦 提交于 2019-12-22 04:49:12
问题 I have developed a web application where i can register a employee. My web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>Employee Registration</display-name> <welcome-file-list>

access common property file inside bundle with osgi

╄→尐↘猪︶ㄣ 提交于 2019-12-21 19:52:57
问题 I have an osgi application (in felix) with multiple bundles. There are some common property files in one bundle and the rest of the bundles need just use them. We use maven and spring osgi, the property files are in resouces like: <path to bundle>/src/main/resources/ common.properties engine.properties ... Maven builds them inside the bundle jar normally so they should be in an application classpath, but Spring has no access to them, this fails: <context:property-placeholder location=

Loading Nested Placeholders from Properties File with Spring

我怕爱的太早我们不能终老 提交于 2019-12-21 11:28:18
问题 Is it possible to load nested placeholders from within a properties file? I am trying to load a URL dynamically. For instance, if my properties file contains my.url=http://localhost:8888/service/{nestedProperty}/ Is there a way to load in values for {nestedProperty} at runtime? Similar to the behavior of a ResourceBundle. If so, how would would I be able to effectively instantiate the String? So far I'm thinking <bean id="myURLString" class="java.lang.String" scope="prototype" lazy-init="true

Configure Java EE 6 for dev/QA/prod

核能气质少年 提交于 2019-12-20 11:35:58
问题 I have a Java EE 6 app that I build with Maven, code in NetBeans 7 and deploy on GlassFish 3.1.2. As I near completion, I find myself deploying demo builds. The problem is that I don't have any dead easy way to build for different environment such as dev, QA, demo, prod, etc. For some stuff, I've been using a Java class with a bunch of static getters that return values based on the value of an environment constant. But this doesn't help me with conditionally setting javax.faces.PROJECT_STAGE

adding comment in .properties files

戏子无情 提交于 2019-12-20 10:30:16
问题 By using following block of code in build.xml file <propertyfile file="default.properties" comment="Default properties"> <entry key="source.dir" value="1" /> <entry key="dir.publish" value="1" /> <entry key="dir.publish.html" value="1" /> </propertyfile> I am able to generate default.properties file with following file contents source.dir=1 dir.publish=1 dir.publish.html=1 I want to know how can I add my comments in the generated file? E.g. the generated properties should have the following

Reading/Writing to Properties Files inside the jar file

匆匆过客 提交于 2019-12-20 02:49:33
问题 So i am getting back into writing Java after 4 years so please forgive any "rookie" mistakes. I need to have a properties file where i can store some simple data for my application. The app data itself won't reside here but i will be storing info such as the file path to the last used data store, other settings, etc. I managed to connect to the properties file which exists inside the same package as the class file attempting to connect to it and i can read the file but i am having trouble