2017-06-23 57 views
1

我在spring mvc創建的jar文件中有服務。 我的問題是如何通過其他spring引導項目中的rest api來使用此服務。 任何幫助非常感謝。使用web服務在jar中使用服務

我的AppConfig:

package com.Taco; 

import org.springframework.context.annotation.ComponentScan; 
import org.springframework.context.annotation.Configuration; 

@Configuration 
@ComponentScan({"org.DAO","org.Service"}) 
public class AppConfig { 

} 

回答

1
  1. 聲明你的罐子在你的其他Spring項目的依賴。

  2. 在配置類中聲明你的服務@ComponentScan

+0

謝謝你的名聲,我的問題如何掃描了AppConfig類項目 – ElbirchSoft

+0

您可以把您的AppConfig類! – Generic

+0

我通過添加AppConfig類來編輯我的問題,謝謝你的幫助 – ElbirchSoft