Questions tagged [spring-properties]

166 questions
0
votes
1 answer

Spring - Is it possible to resolve properties (such as environment variables) recursively in properties file?

I am using @PropertySource and PropertySourcesPlaceholderConfigurer to load my properties file: @Configuration @PropertySource("classpath:app.properties") class MyApp { @Bean public PropertySourcesPlaceholderConfigurer…
Jessy56
  • 63
  • 1
  • 10
0
votes
1 answer

How to get a Spring Boot annotation dragged in and executed in a normal Spring application?

I've got a project (this will be used as a dependency) which uses SpringBoot and which populates a POJO from a queues.properties file in the following…
0
votes
1 answer

Spring PropertiesFactoryBean wildcard expansion not working

I'm trying to use PropertiesFactoryBean to load all files ending with .propfrom certain directory.
karolkpl
  • 2,189
  • 10
  • 39
  • 60
0
votes
1 answer

Populate Map with entire .property file from Environment Spring

I have this myProperties.properties files with the following content: enum1 = a enum2 = b enum3 = c enum4 = d and so on... My problem is how can I populate or inject all property values in a Map - enum1..4 as the key and 1..d as the…
0
votes
1 answer

@Value not working in integration tests on Jenkins [Maven surefire]

I've test case structure as below. And we are triggering the TestSuite.java using maven surefire plugin on Jenkins. org.apache.maven.plugins
0
votes
1 answer

spring properties injection without using @Configuration bean

I want to load a property file into a spring bean. I found two approaches : configure in xml as and inject using @Resource or @Autowired Use @PropertySource along with the @Configuration bean. I do not want to create…
lives
  • 1,243
  • 5
  • 25
  • 61
0
votes
1 answer

How to inject property values into Spring Boot component

In my Spring Boot Application, I implemented the following class with a method to call a stored procedure. @Component @ConfigurationProperties(prefix = "spring") public class FmTrfUtil { static int returnVal; …
ddd
  • 4,665
  • 14
  • 69
  • 125
0
votes
1 answer

How to retrieve property file name in jsp?

I want to get the name of the property file being loaded at the spring initialization (during tomcat container startup) in the JSP during runtime.
Abhijeet Ahuja
  • 5,596
  • 5
  • 42
  • 50
0
votes
0 answers

Configure Spring Property of Subclass Field with Same Name as Parent's

Suppose I have the following classes: package wild; import moco.GeneralMovement; public class Animal{ protected GeneralMovement movement; public getMovement (){ return movement; } public void setMovement…
0
votes
1 answer

Properties not loading while using 2 context place holders

I wrote a test class to read properties defined @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath*:config/TestOne.xml","classpath*:config/TestTwo.xml" }) public class PropertyTest { …
Jithin
  • 31
  • 3
0
votes
1 answer

Spring MVC Rest environment profiles

I want to be able to use different application.properties in my MVC REST app. I've created application-.properties for each of my enironments. I only managed to get this to work by setting -Dmyapp.env= then adding …
Daniel Cosio
  • 177
  • 1
  • 2
  • 16
0
votes
1 answer

Resolving system properties when app starts on tomcat

So I have my spring bott app: @Configuration @PropertySource("${configuration.file}") public class Application extends SpringBootServletInitializer implements CommandLineRunner { ... public static void main(String[] args) throws IOException { …
Marcin Majewski
  • 1,007
  • 1
  • 15
  • 30
0
votes
1 answer

Spring reads property file but values are null

I don't really understand the problem here. I'm trying to use a properties file in my Spring Application. The file seems to get read but if I try to read the values I get null. This is (part) of my context xml:
breakline
  • 5,776
  • 8
  • 45
  • 84
0
votes
0 answers

messageSource.getMessage send IllegalArgumentException: Unmatched braces in the pattern

I use spring MessageSource to fetch messages from my localisation properties files. In this case I use it to create a mail before sendiing it to the user: String eventTitle = tournament.getEvent().getTitle(); String tournamentMessageTitle =…
Labe
  • 1,262
  • 2
  • 20
  • 30
-1
votes
1 answer

Import component from add-on directory

I am using Vaadin version 21.0.7 with Spring Boot and i want to import Paginator add-on. I have added addon's groupId in applicaton.properties as follows: vaadin.whitelisted-packages=com.test.demo,com.vaadin.componentfactory. The problem is that i…
Theodore
  • 1
  • 2
1 2 3
11
12