Questions tagged [property-files]

Files with .properties extension are mainly used in Java related technologies to store the configurable parameters of an application. They can also be used for storing strings for Internationalization and localization; these are known as Property Resource Bundles.

44 questions
4
votes
1 answer

How to Inject property file in Jenkins and use it values in Java Code

I want to pass username and password in Jenkins by passing through property file and Use this credential in Java program to login to my app. Inject property file in Jenkins Use credentials from that file in my Java program to login to my…
Neel Desai
  • 71
  • 2
  • 3
  • 10
3
votes
2 answers

React JS - Reading environment configurations from external property file

Problem : I am new to React JS, and looking for an option to read environment configs from an external property file. This problem is more specific for one of my clients, who is looking to have an option to change the environment files dynamically.…
Manu
  • 173
  • 2
  • 10
3
votes
2 answers

How to convert config.properties into key value pairs?

I am trying to convert a java properties file into a key value pairs that I can use in jquery. The property file sends information that looks like this: company1=Google company2=eBay company3=Yahoo And I want it in this form: var obj = { company1:…
Mandalina
  • 446
  • 5
  • 22
2
votes
0 answers

H2 database gets activated by default, although I have enabled oracle from Spring boot property files

We use hierarchically organised Spring boot property files in our application. For example, Our application.properties will just contain a single line. spring.profiles.include = logging, kafka, oracle, misc Where all the values separated by comma…
Aryan Venkat
  • 679
  • 1
  • 10
  • 34
2
votes
1 answer

Prevent GIT from changing automatically character encoding

I face a problem as below. Please give me a solution. Thanks in advance! I use Linux OS (ubuntu) Initially, I checkout new branch with the file test.properties file encoding: test.properties: text/plain; charset=unknown-8bit Intellij Seting file…
Mr Special
  • 1,576
  • 1
  • 20
  • 33
2
votes
0 answers

PropertyPlaceholderConfigurer : Unable to read multiple property files

Below is the part of spring-context.xml where PropertyPlaceholderConfigurer bean is defined:
Pallav Jha
  • 3,409
  • 3
  • 29
  • 52
2
votes
1 answer

Global CORS configuration using Java Config is not working

I am having a hard-time to get Global CORS configuration using Java config to work. I'm not sure if it is a known issue because other people also have the same problem: Spring Global CORS configuration not working but Controller level config…
Dane Savot
  • 162
  • 1
  • 9
2
votes
1 answer

How to use YAML files using Spring Framework?

My application is spring based, and I would like to load yml file from a centralized server, but the unable to do so. My yml file is like this: spring: application: name: signed-in-web cloud: config: uri: ${server.url} health: …
Usama Nadeem
  • 89
  • 1
  • 4
  • 10
2
votes
3 answers

I want to get the next incremented value of 9 (which is 10 of course) but it returns an ASCII code

I was working on a property file. On it, I have an key which is "user_email" and the value, I set it to toomeuser0@gmail.com. Now, in my code, I want the email value to iterate whenever my program runs, so toomeuser0@gmail.com will be…
Jong Onin
  • 215
  • 1
  • 5
  • 12
2
votes
1 answer

Java - purpose of property files

How are property files useful? I know property files are used to store config values and localization values. But why can't we have those values in Java class? What benefits does a property file give over Java files?
meesun
  • 57
  • 6
2
votes
1 answer

How work with 3rd-party @ConfigurationProperties @Bean?

I use IntellijIdea and gradle. Gradle config: ... apply plugin: 'propdeps' apply plugin: 'propdeps-idea' apply plugin: 'propdeps-maven' buildscript { repositories { maven { url 'http://repo.spring.io/plugins-release' } } …
DamienMiheev
  • 998
  • 8
  • 31
1
vote
1 answer

I want to add a timeStamp("app_logs_2023-05-15.log") in the generated log file from Log4J Java in my selenium project, but not happening

I have tried with log4j.appender.file.File=logs/app_logs%d{yyyy-mm-dd}.log but file is getting generated with "app_logs%d{yyyy-mm-dd}.log" name. TimeStamp is not getting added. Also tried with…
1
vote
1 answer

Common version management for Gradle and maven

We have a spring-boot java project which has both maven and Gradle. The problem is with dependencies, each has its own version of dependencies. For example, in maven MySQL dependency is mysql
shashantrika
  • 1,039
  • 1
  • 9
  • 29
1
vote
2 answers

SymmetricDS Community Edition passwords hard-coding in property files

We have setup SymmetricDS on Windows for SQL server databases and it's working fine. But we have hard-coded the passwords in property files. My question here is, is there any way to avoid hard-coding?
sweenal
  • 67
  • 8
1
vote
0 answers

Spring boot jar doesnt pick property if the properties file are split up

I have a spring boot jar and I have properties defined in app-test.yml kept at src/main/resources within the jar. If i have the db details also in this single file, everything works fine. But If I move the few properties in external file and run as…
Techno
  • 91
  • 1
  • 1
  • 6
1
2 3