문제

May i know does @Source annotation only allow read file from src/package/client/* folder? can it read from /war/ folder?

도움이 되었습니까?

해결책

@Source reads from the classpath at compile time.

If you want/need to load resources that you don't want compiled into your JS, then use ScriptInjector or similar (RequestBuilder+StyleInjector or just dynamically adding a LinkElement to the DOM). If you want the ease of use of, say, ImageResource or CssResource, you could hand-write implementations rather than rely on the GWT generator. For CssResource, you could also simply use a dummy CSS stylesheet declaring all your classes as @external (and then injecting the CSS using either StyleInjector or a dynamic LinkElement).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top