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 | 100 | } |
| 101 | 101 | |
| 102 | 102 | @Autowired |
| 103 | + private CarRestService carRestService; | |
| 104 | + | |
| 105 | + @Autowired | |
| 103 | 106 | ScheduleRealService scheduleRealService; |
| 104 | 107 | @Autowired |
| 105 | 108 | StationRestService stationRestService; |
| ... | ... | @@ -150,7 +153,7 @@ public class CXFConfig { |
| 150 | 153 | endpoint.setAddress("/rest"); |
| 151 | 154 | endpoint.setServiceBeans(Arrays.<Object>asList( |
| 152 | 155 | new LineRestService(), |
| 153 | - new CarRestService(), | |
| 156 | + carRestService, | |
| 154 | 157 | new PersonRestService(), |
| 155 | 158 | gpsRestService, |
| 156 | 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 | 9 | import org.slf4j.Logger; |
| 10 | 10 | import org.slf4j.LoggerFactory; |
| 11 | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| 12 | +import org.springframework.stereotype.Component; | |
| 12 | 13 | |
| 13 | 14 | import javax.ws.rs.*; |
| 14 | 15 | import javax.ws.rs.core.MediaType; |
| ... | ... | @@ -19,6 +20,7 @@ import java.util.Map; |
| 19 | 20 | /** |
| 20 | 21 | * Created by panzhao on 2017/3/30. |
| 21 | 22 | */ |
| 23 | +@Component | |
| 22 | 24 | @Path("/car") |
| 23 | 25 | @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) |
| 24 | 26 | public class CarRestService { | ... | ... |