spring-guides/gs-messaging-stomp-websocket

main.css 404

AChangFeng opened this issue · 3 comments

Following this guide: http://spring.io/guides/gs/messaging-stomp-websocket/, I got a 404 when i point my browser at http://localhost:8080.

dsyer commented

Works for me. Did you run the code in the complete sample?

@AChangFeng At fisrt, path "webjars" means resources which included by JAR. so your pom.xml should add those dependencies, like compile/pom.xml. besides, you can reference local resources, by add those resources in your code.
Like this below, I truly have those js and css in the src path.

`
<title>Hello WebSocket</title>


<script src="/js/jquery.min.js"></script>
<script src="/js/sockjs.min.js"></script>
<script src="/js/stomp.min.js"></script>
<script src="/js/app.js"></script>

`

I add prefix path "js" and "css" to show it works with any prefix expect "webjars".
@dsyer The README.adoc explains that these dependencies should be added, but not in the right place of the doc.Can i submit to move it to the right place or use local resources? In my opinion, use local resources is friendly for beginner. Beginner can easy understand how it works.

dsyer commented

Not quite sure what you mean by "any prefix" - with the code in this project the app works. I have adjusted the listings that show the webjars included in the build (they were pointing to the wrong files). Maybe that makes it more comfortable, and may explain the OP.