Questions tagged [property-placeholder]

77 questions
1
vote
1 answer

Spring Boot - Resolve placeholders in the main app when testing

I've had a hard time launching Spring tests - placeholders don't seem to be resolved in the main program while testing. For instance, there is a RESTController method: @RequestMapping("${hello_path}") private String helloWorld() { return…
1
vote
1 answer

Purpose of placeholders in Flyway database migrations

The Flyway database migration tool includes a feature for placeholder replacement. What is the purpose of the placeholder? In what kind of real-world practical scenarios might the placeholder be useful? Can you describe some simple examples to…
Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
1
vote
1 answer

Unable to read property file by property-placeholder in Spring. Getting The system cannot find the file specified error

When I tried to load property file which is in the source code, I am getting issues. But when I tried to load property file externally, it working fine. Mentioned both working and not working code below. Can someone help me on this. I am a very new…
1
vote
3 answers

SpringBoot don't replacen System variable {user.home} in Spring Tool Suite Version: 3.8.4.RELEASE

I've generated a Spring Boot web application using Spring Initializr, using embedded Tomcat + Thymeleaf template engine in a macOS Sierra. I want to use the System variable User Home Folder Name in Mac OS I have this Spring class configuration in…
Nuñito Calzada
  • 4,394
  • 47
  • 174
  • 301
1
vote
1 answer

Use of SystemPropertyInitializer to set System Property before setting property placeholder

According to this answer, you can use the Spring Batch class org.springframework.batch.support.SystemPropertyInitializer to set a System Property during startup of a Spring Context. In particular, I was hoping to be able to use it to set ENVIRONMENT…
1
vote
0 answers

Using a custom interceptor in spring-boot, the @Value default is taking precedence over my configured value

I am in the trenches of writing my first spring-boot app, so I believe I have a configuration issue somewhere that is causing my error. I have a class, "MyInterceptor", and it is annotated with "@Component" and extending…
1
vote
0 answers

Where can I found the placeholder schema for camel?

I want to use the following syntax to define a property attribute in a camel context like this: .... and I cannot…
chrisblo
  • 768
  • 1
  • 13
  • 30
1
vote
2 answers

Qt application name placeholder

In Qt 4.8.6, is there a mechanism to show the value of QCoreApplication::applicationName() in the GUI without programming? I mean, is there a set of placeholders which can be used in QWidget::windowTitle(), QLabel::text() and other properties, that…
yman
  • 349
  • 4
  • 18
1
vote
1 answer

Spring placeholder inside location of PropertyPlaceholderConfigurer

I'm trying to initialize PropertyPlaceholderConfigurer bean with 2 locations. First location has static value, pointing to property file. That file contains a path to dir with the second location. The structure of application context file is like…
Dark Tomel
  • 123
  • 2
  • 13
1
vote
2 answers

Can not load property file in spring-context.xml. Property file Path is given as a placeholder in dev.properties

I am loading property file in spring-context.xml and i am giving external property file location in ${spring.profiles.active}.properties which is in classpath and using the location as a placholder in spring-context.xml. My spring-context.xml…
Rosh
  • 11
  • 4
1
vote
2 answers

Using property placeholder location

I have database.properties file with some properties defined. And also application-context.xml file where I'm trying to put these values to databaseRepository bean properties:
Andrew K.
  • 56
  • 1
  • 8
1
vote
2 answers

In Spring, getting "java.lang.IllegalArgumentException: Could not resolve placeholder" despite having defined "PropertyPlaceholderConfigurer"

I’m using Spring 3.2.11.RELEASE with Maven 3.3. I have this defined in my application context file …
Dave
  • 15,639
  • 133
  • 442
  • 830
1
vote
0 answers

Spring PropertyPlaceholderConfigurer with Maven Properties

I'm displaying some version metadata in my web application, and I do this using a Maven resources filter that will update one of my properties files.
The Gilbert Arenas Dagger
  • 12,071
  • 13
  • 66
  • 80
1
vote
1 answer

Updating properties file during spring context load

I want to integrate Jasypt library with spring properties mechanism. In example tutorial here: http://www.jasypt.org/spring31.html author assumed that user performed encryption manually and then only passed encrypted value between ENC( )…
It'sMe
  • 125
  • 1
  • 15
1
vote
1 answer

context:property-placeholder how to reference the property bean

We have this existing property loader configuration in our spring context
emeraldjava
  • 10,894
  • 26
  • 97
  • 170