use autowired to fetch freshserviceimpl instance
This commit is contained in:
父節點
2546987df5
當前提交
9e03b00796
@ -60,6 +60,7 @@ public class freshController {
|
|||||||
}
|
}
|
||||||
ServletUtil.createSuccessResponse(200, result, response);
|
ServletUtil.createSuccessResponse(200, result, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/updating", method = RequestMethod.POST)
|
@RequestMapping(value = "/updating", method = RequestMethod.POST)
|
||||||
public void updating(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
public void updating(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||||
String oldVersionId = request.getParameter("oldVersionId");
|
String oldVersionId = request.getParameter("oldVersionId");
|
||||||
|
@ -10,7 +10,7 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class refreshServiceImpl implements refreshService {
|
public class refreshServiceImpl implements refreshService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
freshServiceImpl ser = new freshServiceImpl();
|
freshServiceImpl ser = new freshServiceImpl();
|
||||||
|
|
||||||
//version1大返回一个正数,小返回一个负数,相等返回0
|
//version1大返回一个正数,小返回一个负数,相等返回0
|
||||||
@ -35,7 +35,6 @@ public class refreshServiceImpl implements refreshService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public fresh new_version(String oldVersion) throws Exception {
|
public fresh new_version(String oldVersion) throws Exception {
|
||||||
freshServiceImpl ser=new freshServiceImpl();
|
|
||||||
String newVersion = ser.query().VersionId;
|
String newVersion = ser.query().VersionId;
|
||||||
if (compareVersion(oldVersion, newVersion) < 0) {
|
if (compareVersion(oldVersion, newVersion) < 0) {
|
||||||
return ser.query();
|
return ser.query();
|
||||||
|
載入中…
x
新增問題並參考
Block a user