Open agi76 opened 6 years ago
Answered my own question...
Switching to ClassPathResource solved the problem:
private String getBundleName() { TypeReference<HashMap<String,String>> typeRef = new TypeReference<HashMap<String,String>>() {}; Map<String, String> manifest = mapper.readValue(new ClassPathResource("public/asset-manifest.json").getInputStream(), typeRef); return "public/" + manifest.get("main.js"); }
Thanks for the issue. I've reopened this as I'm surprised you had to change the code in order for the standalone JAR to work. When I get time I'll look into it myself.
Hey,
Have been playing around with your project and it's great. Really like the hot changes, makes development so fast.
Just one question, when trying to run the jar file using:
java -jar spring-react-boilerplate-1.0.0-SNAPSHOT.jar
I get:
FileNotFoundException: class path resource [public/asset-manifest.json] from com.pugnascotia.reactdemo.config.ViewConfig.getBundleName(ViewConfig.java:84)
Is there something I need to do?
Thanks!