Commit 646087de79d7e5ff32fc60caf92fb8affe071723
1 parent
528952fd
1.车辆提供刷新车辆缓存接口
Showing
2 changed files
with
6 additions
and
1 deletions
src/main/java/com/bsth/CXFConfig.java
| @@ -100,6 +100,9 @@ public class CXFConfig { | @@ -100,6 +100,9 @@ public class CXFConfig { | ||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | @Autowired | 102 | @Autowired |
| 103 | + private CarRestService carRestService; | ||
| 104 | + | ||
| 105 | + @Autowired | ||
| 103 | ScheduleRealService scheduleRealService; | 106 | ScheduleRealService scheduleRealService; |
| 104 | @Autowired | 107 | @Autowired |
| 105 | StationRestService stationRestService; | 108 | StationRestService stationRestService; |
| @@ -150,7 +153,7 @@ public class CXFConfig { | @@ -150,7 +153,7 @@ public class CXFConfig { | ||
| 150 | endpoint.setAddress("/rest"); | 153 | endpoint.setAddress("/rest"); |
| 151 | endpoint.setServiceBeans(Arrays.<Object>asList( | 154 | endpoint.setServiceBeans(Arrays.<Object>asList( |
| 152 | new LineRestService(), | 155 | new LineRestService(), |
| 153 | - new CarRestService(), | 156 | + carRestService, |
| 154 | new PersonRestService(), | 157 | new PersonRestService(), |
| 155 | gpsRestService, | 158 | gpsRestService, |
| 156 | waybillRestService, | 159 | waybillRestService, |
src/main/java/com/bsth/server_rs/base_info/car/CarRestService.java
| @@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringEscapeUtils; | @@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringEscapeUtils; | ||
| 9 | import org.slf4j.Logger; | 9 | import org.slf4j.Logger; |
| 10 | import org.slf4j.LoggerFactory; | 10 | import org.slf4j.LoggerFactory; |
| 11 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 12 | +import org.springframework.stereotype.Component; | ||
| 12 | 13 | ||
| 13 | import javax.ws.rs.*; | 14 | import javax.ws.rs.*; |
| 14 | import javax.ws.rs.core.MediaType; | 15 | import javax.ws.rs.core.MediaType; |
| @@ -19,6 +20,7 @@ import java.util.Map; | @@ -19,6 +20,7 @@ import java.util.Map; | ||
| 19 | /** | 20 | /** |
| 20 | * Created by panzhao on 2017/3/30. | 21 | * Created by panzhao on 2017/3/30. |
| 21 | */ | 22 | */ |
| 23 | +@Component | ||
| 22 | @Path("/car") | 24 | @Path("/car") |
| 23 | @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) | 25 | @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) |
| 24 | public class CarRestService { | 26 | public class CarRestService { |