だから、背景画像の設定が機能しない理由について少し混乱しています。.top などの他の SCSS メソッドを使用して色などを設定できますが、SCSS を介して画像を取得すると、アプリケーションでエラーが発生します。
神話:
@import "../valo/valo.scss";
@import "../valo/fonts/fonts.scss";
@import "../valo/styles.css";
@mixin mytheme {
@include valo-components;
@include valo-common;
@include vaadin-icons;
@include valo;
background-color: lawngreen;
}
スタイル.scss:
@import "mytheme.scss";
@import "addons.scss";
@import "../valo/styles.css";
// This file prefixes all rules with the theme name to avoid causing conflicts with other themes.
// The actual styles should be defined in mytheme.scss
.mytheme {
@include addons;
@include valo;
@include mytheme;
.backgroundImage{
background: url("img/background.jpg ") ;
}
.v-view {
}}
アプリは本番モードで実行されており、イメージ ファイルのパスは次のとおりです。
D:\Programming\app\src\main\WebContent\VAADIN\themes\mytheme\img\background.jpg
エラー:
INFO 16672 --- [nio-8080-exec-9] com.vaadin.server.VaadinServlet :
Requested resource
[/VAADIN/themes/mytheme/VAADIN/themes/mytheme/img/background.jpg] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
ここで何が起こっているのか誰にも分かりませんか?