redis
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.czg;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
@@ -11,6 +12,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients
|
||||
@MapperScan("com.czg.service.account.mapper")
|
||||
public class AccountApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(AccountApplication.class, args);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.czg.controller;
|
||||
|
||||
import com.czg.dto.SysLoginDTO;
|
||||
import com.czg.service.account.dto.SysLoginDTO;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.service.AuthorizationService;
|
||||
import com.czg.service.account.service.AuthorizationService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.czg.controller;
|
||||
|
||||
import com.czg.feign.FeignSystemService;
|
||||
import com.czg.service.account.feign.FeignSystemService;
|
||||
import com.czg.service.RedisService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -15,10 +17,14 @@ public class FeignController {
|
||||
@Resource
|
||||
private FeignSystemService feignSystemService;
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@RequestMapping("/test")
|
||||
public String test() {
|
||||
String string = feignSystemService.testCall("sssss");
|
||||
System.out.println(string);
|
||||
redisService.set("sssss", string);
|
||||
return "test";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.czg.controller;
|
||||
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.service.ShopInfoService;
|
||||
import com.czg.service.account.service.ShopInfoService;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -6,6 +6,13 @@ spring:
|
||||
username: cashier
|
||||
password: Cashier@1@
|
||||
|
||||
data:
|
||||
redis:
|
||||
host: 121.40.128.145
|
||||
port: 6379
|
||||
password: 111111
|
||||
timeout: 1000
|
||||
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
@@ -22,3 +29,4 @@ spring:
|
||||
namespace: 237e1905-0a66-4375-9bb6-a51c3c034aca
|
||||
|
||||
|
||||
|
||||
|
||||
26
cash-api/api-config/pom.xml
Normal file
26
cash-api/api-config/pom.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.czg</groupId>
|
||||
<artifactId>cash-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>api-config</artifactId>
|
||||
<packaging>maven-plugin</packaging>
|
||||
|
||||
<name>api-config Maven Plugin</name>
|
||||
|
||||
<url>https://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @author GYJoker
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feign")
|
||||
@RequestMapping("/admin/feign")
|
||||
public class FeignController {
|
||||
|
||||
@RequestMapping("/testCall/{name}")
|
||||
|
||||
@@ -6,6 +6,19 @@ spring:
|
||||
username: cashier
|
||||
password: Cashier@1@
|
||||
|
||||
data:
|
||||
redis:
|
||||
host: 121.40.128.145
|
||||
port: 6379
|
||||
password: 111111
|
||||
timeout: 1000
|
||||
lettuce:
|
||||
pool:
|
||||
min-idle: 0
|
||||
max-idle: 8
|
||||
max-wait: -1ms
|
||||
max-active: 16
|
||||
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
|
||||
Reference in New Issue
Block a user