Google App Engine (1.8.5) 프로젝트가 있습니다. Webjars 를 통해 정적 Javascript 및 CSS를 제공하고 싶습니다 . 그러나 계속 HTTP 404
오류 가 발생합니다. Webjars 파일에 액세스 할 수있게하려면 어떻게합니까?
내 src/main/webapp/WEB-INF/appengine-web.xml
Google 문서에 따라 :
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
...
<static-files>
<include path="/resources/**" />
<include path="/webjars/**" />
</static-files>
</appengine-web-app>
My src/main/webapp/index.html
, Webjars에서 제공하는 Bootstrap CSS 파일을 참조 합니다.
<html>
<head>
<link rel="stylesheet" href="webjars/bootstrap/3.0.0/css/bootstrap.min.css">
</head>
...
</html>
의 스 니펫 pom.xml
:
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>(lots)</artifactId>
<version>1.8.5</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.0-beta</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.0.0</version>
</dependency>
이것은 GAE가 처음 게시 한 질문이므로 제공 할 추가 정보가 무엇인지 잘 모르겠습니다.
불행히도 Webjars에는 Servlet 3.x 컨테이너가 필요하지만 Google App Engine은 현재 버전 2.5에만 있습니다.
GAE 문제 목록 에서이 문제 에 별표를 표시 할 수 있습니다 .
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다