0

I am trying to push maven application on Pivotal cloud foundary with following manifest file configuration.

applications:
- name: abc-app
  host: abc-app
  instances: 1
  memory: 1024m
  builpack: java_buildpack_beta
  path: ./target/abc-7.0.46-SNAPSHOT.war
  
  JAVA_VERSION: 11.0.6

I want to load properties files like bootstrap.properties and server.properties. How to do that? I am getting this exception while doing cf push from cloud foundary CLI.

       2021-08-30T19:12:42.97+0530 OUT [CONTAINER] loudAutoReconfigurationServletContainerInitializer INFO    Initializing ServletContext with Auto-reconfiguration ApplicationContextInitializers
       2021-08-30T19:12:43.03+0530 OUT [CONTAINER] lina.core.ContainerBase.[Catalina].[localhost].[/] INFO    No Spring WebApplicationInitializer types detected on classpath
       2021-08-30T19:12:43.05+0530 ERR java.io.FileNotFoundException: null/bootstrap.properties (No such file or directory)

Thanks in advance!

  • There's not a lot of detail here, so wild guess but since you're using Spring, you could look at ClassPathResource - https://stackoverflow.com/a/36589635/1585136 (or another resource type). There is not one answer for this question though and it depends on what libraries you're using (some stuff can be loaded automatically, by convention with Spring Boot and other libraries). – Daniel Mikusa Aug 31 '21 at 13:14
  • Thanks Daniel for reply. But I want to load tomcat properties files. In CF we dont have to have tomcat to deploy web application. CF droplet will automatically creates tomcat container and try to run the web application in it. Which in my case aslo happening but only things are bootstrap.properties file and other properties files are not able to pick up. – Mayur Ingale Sep 01 '21 at 06:10
  • Sorry, it's still not clear what you're trying to do here. Maybe take a step back and try to explain in more detail. If you need Tomcat, then you need to have Tomcat installed. Maybe CF & buildpacks will provide Tomcat, but it's still there and installed. As an example, if that's the case, indicate it in your question. Other things to include would be the output of `cf push` and other supporting info like error messages and code snippets to explain what you've tried, what's not working & also what you'd like to see happen. – Daniel Mikusa Sep 01 '21 at 19:43

0 Answers0