0

I am trying to understand the resources directory in a Spring Boot application and if it is the correct place to place my google-services.json file.

Are the files put in the resources folder visible in any way to the public when the application is launched? (e.g. can a random user on the internet list what is in the resources directory)? Or is that folder private only to the application?

I want to make sure no random user on the internet can get access to the google-services.json because it has API Keys.

The reason I put it in the resources folder is because I need to read that file in my application code as an input stream to pass into another class.

If there is a better place to put this file please let me know.

14
  • The answer to all three of your questions is No :). The best location for this depends on where you're running your service. Commented Oct 5, 2023 at 22:56
  • @lane.maxwell I updated my question, could you re-address?
    – BlueBoy
    Commented Oct 5, 2023 at 23:00
  • You're still missing the most crucial information: where are you running your service? Commented Oct 5, 2023 at 23:03
  • @lane.maxwell I need to use this file to access an API in a different project. But it shouldn't matter what I am doing. My question is simple, can random users on the internet look into my resources folder? Is it like the WEB-INF folder?
    – BlueBoy
    Commented Oct 5, 2023 at 23:05
  • 1
    @lane.maxwell Yeah my application is small so it is not complex. Thanks.
    – BlueBoy
    Commented Oct 5, 2023 at 23:36

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.