Css 从类路径导入较少的文件(引导WebJAR)

Css 从类路径导入较少的文件(引导WebJAR),css,twitter-bootstrap,spring-boot,gradle,less,Css,Twitter Bootstrap,Spring Boot,Gradle,Less,我想通过lesscsgradleplugin()从较少的文件生成CSS文件 在我的build.gradle中,我添加了用于引导的webjar依赖项等等 dependencies { implementation project(':pet-clinic-data') implementation 'org.springframework.boot:spring-boot-starter-actuator:2.3.2.RELEASE' implementation 'org.springframe

我想通过lesscsgradleplugin()从较少的文件生成CSS文件

在我的build.gradle中,我添加了用于引导的webjar依赖项等等

dependencies {
implementation project(':pet-clinic-data')
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.3.2.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:2.3.2.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-web:2.3.2.RELEASE'
implementation 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
implementation 'org.webjars:webjars-locator-core:0.45'
implementation 'org.webjars:jquery:2.2.4'
implementation 'org.webjars:jquery-ui:1.11.4'
implementation 'org.webjars:bootstrap:3.3.6'
runtimeOnly 'org.springframework.boot:spring-boot-devtools:2.3.2.RELEASE'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.3.2.RELEASE'
compile group: 'org.springframework', name: 'spring-tx', version: '5.2.8.RELEASE'
}
还有我的lesscss任务:

lesscss {
source = fileTree('src/main/less') {
    include '**/*.less'

}
dest = "$buildDir/resources/main/static/resources/css"

dependencies {
    compile 'org.webjars:bootstrap:3.3.6'
    compileClasspath 'org.webjars:bootstrap:3.3.6'
}
}
我有一些较少的文件需要bootstrapWebjar中类的元素(例如:labelsuccess)。我的外部依赖项中有webjar,但是如何使用@Import语句链接到它呢? 我试过这样的方法:

@import "classpath: resources/webjars/bootstrap/3.3.6/less/bootstrap.less";
@import "classpath:META- 
 INF/resources/webjars/bootstrap/3.3.6/less/bootstrap.less"