2017-10-08 13 views
0

私は安らかなウェブサービスを設定し、スプリングブートの助けを借りてホストしました。しかし、私はサービスを打つことができません。そして応答ステータス取得:-1 - (中止またはタイムアウトした)失敗した要求スプリングブートで実行中の休憩サービスにヒットできません

ログ: -

⁃ 2017-10-08 18:33:33.149 INFO 6806 --- [   main] com.mypleaks.PleaksRSApp     : Starting PleaksRSApp on 3inmderaj1.local with PID 6806 (/Users/deraj/home/code/leaks-rs/mypleaks-rs/myPleaks-RS/target/classes started by deraj in /Users/deraj/home/code/leaks-rs/mypleaks-rs/myPleaks-RS) 
⁃ 2017-10-08 18:33:33.155 INFO 6806 --- [   main] com.mypleaks.PleaksRSApp     : No active profile set, falling back to default profiles: default 
⁃ 2017-10-08 18:33:33.202 INFO 6806 --- [   main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot[email protected]311bf055: startup date [Sun Oct 08 18:33:33 IST 2017]; root of context hierarchy 
⁃ 2017-10-08 18:33:33.998 INFO 6806 --- [   main] o.s.b.f.s.DefaultListableBeanFactory  : Overriding bean definition for bean 'requestContextFilter' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.class]] with [Root bean: class [org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=requestContextFilter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]] 
⁃ 2017-10-08 18:33:34.276 INFO 6806 --- [   main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
⁃ 2017-10-08 18:33:34.372 INFO 6806 --- [   main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$af71e9e1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 
⁃ 2017-10-08 18:33:34.745 INFO 6806 --- [   main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http) 
⁃ 2017-10-08 18:33:34.756 INFO 6806 --- [   main] o.apache.catalina.core.StandardService : Starting service Tomcat 
⁃ 2017-10-08 18:33:34.756 INFO 6806 --- [   main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.6 

リソース: - enter image description here

要求: - enter image description here

レスポンス: - enter image description here

答えて

0

あなたは春のものの代わりにjavax.パッケージの注釈を使用しているようです。

は(他のすべての注釈も春のパッケージからでなければなりません)クラスレベルに@RestController使用してメソッドレベルに@RequestMapping試してみてください。

@RestController 
@RequestMapping(path = "/place") 
public class PlaceResource{ 


    @RequestMapping(method = RequestMethod.GET, path="/countries") 
    public Response getCountries(..){..} 
} 
+0

はい、私はjavaxを使用しています。私はこのコードをテストしたが突然停止した。そして私はjavaxを使う必要があります。のみ、Springアノテーションに切り替えることはできません。 –

0

申し訳ありませんがみんな、ITSは私の側からひどい間違いでした。私は私のアプリケーションで以下のコードを使用しました。

public class NotificationEngine implements InitializingBean { 

@Override 
public void afterPropertiesSet() throws Exception {"Here I was running some stupid endless process, Due to which the tomcat was not getting up completely and because of that Iwas getting this issue."}} 
関連する問題