-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from liy-cn/dev
解决扫描不到包的问题,以及数据库连接问题
- Loading branch information
Showing
9 changed files
with
60 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
...web/src/main/java/org/storm/commons/commonofflinetaskweb/controllers/DemoControllers.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...kweb/CommonOfflineTaskWebApplication.java → ...task/CommonOfflineTaskWebApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...monofflinetaskweb/ServletInitializer.java → ...mmons/offlinetask/ServletInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...ine-task-web/src/main/java/org/storm/commons/offlinetask/controllers/DemoControllers.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package org.storm.commons.offlinetask.controllers; | ||
|
||
import com.alibaba.fastjson.JSON; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.storm.commons.offlinetask.MyApi; | ||
import org.storm.commons.offlinetask.api.OfflineTaskManageApi; | ||
import org.storm.commons.offlinetask.api.OfflineTaskScanApi; | ||
import org.storm.commons.offlinetask.domain.OfflineTaskDTO; | ||
|
||
import javax.annotation.Resource; | ||
|
||
@RestController | ||
@RequestMapping("/demo") | ||
@Slf4j | ||
public class DemoControllers { | ||
|
||
@Autowired | ||
private MyApi myApi; | ||
|
||
@Autowired | ||
private OfflineTaskManageApi offlineTaskManageApi; | ||
|
||
@Autowired | ||
private OfflineTaskScanApi offlineTaskScanApi; | ||
|
||
/** | ||
* http://localhost:8080/demo/getMyApiName | ||
* @return myApiImpl | ||
*/ | ||
@GetMapping("/getMyApiName") | ||
String getMyApiName() { | ||
String myApiName = myApi.getName(); | ||
log.info(myApiName); | ||
if(offlineTaskManageApi != null){ | ||
OfflineTaskDTO offlineTaskDTO = offlineTaskManageApi.selectById(1L); | ||
log.info("offlineTaskDTO:{}", JSON.toJSONString(offlineTaskDTO)); | ||
} | ||
if(offlineTaskScanApi != null){ | ||
log.info("offlineTaskDTO:{}", JSON.toJSONString(offlineTaskScanApi)); | ||
} | ||
|
||
return myApiName; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...fflinetaskweb/service/impl/MyApiImpl.java → ...s/offlinetask/service/impl/MyApiImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters