2016-12-01 8 views
1

thisガイドを使用してjHipsterアプリを作成し、awsでrdsを作成し、aplication-dev.ymlファイルでdb url、username、およびpasswordを設定しました。 thisガイドを使用してボックスフューズでawsにアプリケーションをデプロイしようとすると、このエラーが発生します。BoxfuseでjHipsterをawsに展開

ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'accountResource': Unsatisfied dependency expressed through field 'userService'; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userService': Unsatisfied dependency expressed through field 'jdbcTokenStore'; 
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.security.oauth2.provider.token.store.JdbcTokenStore' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.inject.Inject()} 

o.s.boot.SpringApplication: Error handling failed (Error creating bean with name 'delegatingApplicationListener' 
defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: 
BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': 
Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available) 

Description: Field jdbcTokenStore in org.foodorder.service.UserService required a bean of type 'org.springframework.security.oauth2.provider.token.store.JdbcTokenStore' that could not be found. 

Action: Consider defining a bean of type 'org.springframework.security.oauth2.provider.token.store.JdbcTokenStore' in your configuration. 

どのようにこの問題を解決できますか? 「アクション」で説明されているBeanを定義する方法は? ご協力いただきありがとうございます。

また、boxfuseは、-db.type = noneと入力してもrdsデータベースを作成します。このオプションを無効にする方法はわかりません(ドキュメントには-db.type = noneと書かれています)。私自身のdb。

+0

注-db.type = noneは、アプリケーションの作成時に適用する必要があります。後で変更することはできません。したがって、Boxfuseデータベースの自動プロビジョニングを無効にするには、 'boxfuse destroy'の後に' boxfuse create -db.type = none'を実行する必要があります。 –

+0

@AxelFontaine私は配備に関する最初の問題を解決しました。さて、 'boxfuse create -db.type = none'は、 'create'コマンドが存在しないことを示しています。私はこのコマンドで試してみると 'boxfuse run -env = prod -db.type = none myapp.jar'のboxfuseがデプロイされますが、とにかくdbが作成されます。 mvnを使用してアプリケーションをパッケージ化するときにdb.type = noneを使用する必要がありますか?それとも最初から間違った方法でやっていますか? P.P.あなたの時間をありがとう。 –

答えて

1

私は配備に関する私の問題を解決しました。変更する必要があったのは私のprocfileだけでした。 代わりの

web: java -jar target/*.war --spring.profiles.active=prod,heroku --server.port=$PORT 

私procfileは次のようになります。

web: heroku --server.port=$PORT 
web: java $JAVA_OPTS -Dserver.port=$PORT -Dspring.profiles.active=prod -jar target/*.war 

私は、これは同様の問題を持つ人に役立ちます願っています。

関連する問題