|
@@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
|
+import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -15,19 +16,15 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@SpringBootApplication
|
|
|
-@RestController
|
|
|
+@EnableFeignClients
|
|
|
@EnableDiscoveryClient
|
|
|
-@MapperScan("com.fdkankan.scene.mapper")
|
|
|
+@MapperScan("com.fdkankan.**.mapper")
|
|
|
public class SceneApplication {
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
SpringApplication.run(SceneApplication.class, args);
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private RedisTemplate<String, String> redisTemplate;
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 注入全局异常处理器
|
|
|
*/
|
|
@@ -36,10 +33,4 @@ public class SceneApplication {
|
|
|
return new GlobalExceptionHandler();
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/api/user/test/test")
|
|
|
- public ResultData test(@RequestBody TestDto test){
|
|
|
-
|
|
|
- return ResultData.ok(redisTemplate.opsForValue().get("developer:appid:103029352bef2a90bb51605604899791"));
|
|
|
- }
|
|
|
-
|
|
|
}
|