Place for the custom .properties file on deployment level project

I am using the flow-crm-tutorial for my web application. For my application I need a Custom “. properties” file. So, Where I can place this custom .properties file in my project .Because I want to deploy this application on tomcat server. Here I attach the view of the file structure of my application Project. I tried to add on resource folder but it not work for me.

What did not work? The location is correct - but it’s also possible that you have to configure maven correctly

How should I give path? Like this?

It gives me “inStream parameter is null” exception

when I try to run on development phase

this is my pom.xml file
pom.xml (10.1 KB)

The convention is to have application-[environment].properties files and then use profiles to load the correct one. That way you can have different properties for development and production, for instance. The tutorial covers that in the last step

I can’t understand

Can you tell me how to read it from recourse folder this properties file and where I can place it.

So I can use it for production level also

Check out this stack overflow answer, for instance spring boot - Segregating Springboot app for DEV and PROD Environment for the email app - Stack Overflow

let me explain well, I have two properties file 1. Default( and 2) Custom ( file has just key and values nothing related to spring or vaadin configuration. it has just String for just changing the data from the MyConfig file so we don’t need to change something in the code and deploy it again on the server. Moreover, I want to read (load) this file in my class. Now I am on the development level so I put this File on src/main/resourrces/ And now i just load it with like p.load(new FileInputStream(“src/main/resources/MyConfig”)); It’s work for development level but i create .war file and deploy on tomcat .it shows me error MyConfig file can’t find

this is an

this is

This is the method where I want to load my file.

So my question is that where I can put this file so that I can use it for production level also.

and how can I load it my Class method

Hi, I try to explain my problem. Please help me.

You can put custom properties in as well. You don’t need to load a properties file manually. You can inject the values using the @Value annotation