2016-05-20 2 views
0

Activiti Angular appActiviti rest api Spring boot starterを1つのSpringブートプロジェクトで結合しようとしています。私は/リソース/静的下index.htmlを下/リソース/テンプレートフォルダやCSSやJSファイルを置いだからここActivitiアングルアプリとActivitiスプリングブートスターターの組み合わせ

プロジェクト

<dependencies> 
    <dependency> 
     <groupId>org.activiti</groupId> 
     <artifactId>activiti-spring-boot-starter-basic</artifactId> 
     <version>${activiti.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>com.h2database</groupId> 
     <artifactId>h2</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.activiti</groupId> 
     <artifactId>activiti-spring-boot-starter-rest-api</artifactId> 
     <version>${activiti.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.activiti</groupId> 
     <artifactId>activiti-spring-boot-starter-actuator</artifactId> 
     <version>${activiti.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.activiti</groupId> 
     <artifactId>activiti-spring-boot-starter-jpa</artifactId> 
     <version>${activiti.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-web</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-devtools</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-thymeleaf</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>net.sourceforge.nekohtml</groupId> 
     <artifactId>nekohtml</artifactId> 
     <version>1.9.21</version> 
    </dependency> 

</dependencies> 

ののpom.xmlですフォルダー。

次に、/homeをリクエストするときにindex.htmlを提供する簡単なスプリングコントローラを設定しました。

問題は私が/homeをリクエストしたときに、ブラウザがcssまたはjsファイルを取得できなかったことです。ここではどのようなログが印刷され:

2016-05-20 23:44:30.626 WARN 24307 --- [nio-8080-exec-2] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/styles/main.css] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:30.725 WARN 24307 --- [nio-8080-exec-3] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/styles/bootstrap.css] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:30.735 WARN 24307 --- [nio-8080-exec-6] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/components/angular-resource/angular-resource.min.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:30.746 WARN 24307 --- [nio-8080-exec-5] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/components/angular-route/angular-route.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:30.756 WARN 24307 --- [nio-8080-exec-7] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/components/angular-bootstrap/ui-bootstrap-tpls.min.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:30.775 WARN 24307 --- [nio-8080-exec-4] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/components/angular/angular.min.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:30.980 WARN 24307 --- [nio-8080-exec-9] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/components/moment/moment.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:31.069 WARN 24307 --- [nio-8080-exec-3] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/scripts/controllers/login.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:31.076 WARN 24307 --- [nio-8080-exec-8] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/components/angular-moment/angular-moment.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:31.084 WARN 24307 --- [nio-8080-exec-2] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/scripts/controllers/root.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:31.102 WARN 24307 --- [io-8080-exec-10] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/scripts/app.js] in DispatcherServlet with name 'dispatcherServlet' 
2016-05-20 23:44:31.150 WARN 24307 --- [nio-8080-exec-1] o.s.web.servlet.PageNotFound    : No mapping found for HTTP request with URI [/scripts/controllers/main.js] in DispatcherServlet with name 'dispatcherServlet' 

しかし、私はすべてのactivitiは、ログインページがすべてのCSSやJSファイルで正しく表示されている依存関係取り除きます。

この問題の原因となっているactiviti jarのSpring Configurationクラスとその修正方法を理解できません。私は助けが必要です。

答えて

1

activiti-spring-boot-starter-rest-apiがあなたのために春のセキュリティを自動設定します。あなたはこれを試すことが

@SpringBootApplication 
    @EnableAutoConfiguration(exclude = { 
     org.activiti.spring.boot.RestApiAutoConfiguration.class, 
     org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class, 
     org.activiti.spring.boot.SecurityAutoConfiguration.class, 
     org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration.class 
    })