Questions tagged [spring-properties]

166 questions
0
votes
0 answers

Spring boot is not able to resolve the properties used in XML configurations when using cloud-starter-config

I'm creating a spring boot application A, using annotations and XML configuration both and config-starter-config to fetch the application properties from config-server. Application is having XML beans file importing other beans XML from the…
0
votes
1 answer

How to insert additional properties from command line?

I want to have Spring Boot application to run as command line application. I would like to provide additional properties that would come from command line arguments and be merged with properties in application.yaml When I use Properties then…
pixel
  • 24,905
  • 36
  • 149
  • 251
0
votes
2 answers

Add list element to Spring properties at runtime

I have an application.yml file with the following: topics: input: - name: topic1 partitions: 3 replicas: 1 - name: topic2 partitions: 6 replicas: 2 I would like to be able to update or add a new topic object at…
wearebob
  • 376
  • 2
  • 15
0
votes
1 answer

Spring - Run test from IDE - how to load test properties from a file like 'application-test.properties'

How can I load test properties from a file like 'application-test.properties'? The file is stored in the src/test/resources folder. I put the file also in all possible folders as well. When running the test as part of the Maven test run, all works…
tm1701
  • 7,307
  • 17
  • 79
  • 168
0
votes
1 answer

How to provide Spring boot properties through a property bean getting initialised at app startup

I have a use case where i have some classes containing properties and getting initialised at the time of app startup from external source And now i want spring boot auto configured beans like datasource takes properties from these property…
pvjhs
  • 549
  • 1
  • 9
  • 24
0
votes
2 answers

How to use a nested java.reflect.Type in a spring properties file

Recently came upon a case where I want up-front but configurable types (long story). Typically I do this Type t = new TypeToken>() {}.getType(); I would like to place that right hand side into my spring properties file and either…
Kongmingtwo
  • 95
  • 2
  • 7
0
votes
0 answers

How to intregrate Cipher with Config-server-client in Spring?

I'm trying to introduce Cipher encryption for the properties when using "spring-cloud-config-server" but without the Spring Boot as an application runner. I have to encrypt the config server credentials so was going to do something like below in my…
code_pretty
  • 145
  • 3
  • 15
0
votes
1 answer

Spring profile loading without being specified

I have a Maven/Spring boot project that I'm seeing some odd behavior in. To summarize, a spring profile is attempting to load, but that profile doesn't exist and isn't specified ANYWHERE in my code. It seems as if the profile name is being picked up…
Jason M.
  • 692
  • 2
  • 8
  • 24
0
votes
1 answer

Spring config server read proterties from local machine if fetch data from git repositories failed

I am new for spring config server. I want to implement spring config server from my application where my config server fetch properties details from git repositories but in case of my git server are not able to respond, how can I read properties…
0
votes
1 answer

Correct delimiter expression for csv next line in Spring Cloud Dataflow Filesplitter Processor

I'm using the Spring Cloud Dataflow server and I am polling csv files with the Time source and the http client processor. Now I want to split the polled csv file and pipeline single line-by-line messages. Since the HttpClientProcessor polls entire…
0
votes
0 answers

Spring Boot, Eureka and Microservice : Cannot execute request on any known server

I have a very simple client with the following configuration. bootstrap.yml : spring: application: name: microservice-expedition cloud: config: uri: http://localhost:9101 My Spring Boot application is the following : package…
0
votes
2 answers

@Profile does not work without Spring Boot (-Dspring.profiles.active with maven)

I'm having trouble to make @Profile work with maven and without Spring Boot. In pom.xml I have defined maven profiles ("env" and "dev" which is also default). Unfortunetly whenever I try to build project with: mvn clean install…
lukaszrys
  • 1,656
  • 4
  • 19
  • 33
0
votes
0 answers

Using spring properties to configure SQL queries in JDBI declarative API

I'd like to be able to configure my database table/column names from spring properties. I am using JDBI through the declarative API for data access. A sample of my code currently look like this: import something.model.User; import…
SalysBruoga
  • 875
  • 1
  • 9
  • 21
0
votes
1 answer

SpringBoot: FileNotFoundException when using PropertySoucre with external file and using java jar command

The service will be started from eclipse, but the same thing doesn't doesn't work if I start using the jar command. It only works if I give absolute path in the property source. I want the property source to work with relative path. Below are the…
shoaib1992
  • 410
  • 1
  • 8
  • 26
0
votes
1 answer

Spring - How to get subset of properties file without enumerating all required properties

I am loading my properties file as following: @Configuration @PropertySource("classpath:app.properties") class MyApp { @Bean public PropertySourcesPlaceholderConfigurer PropertySourcesPlaceholderConfigurer() { return new…
Jessy56
  • 63
  • 1
  • 10