我想使用 Redis 来操作会话。但是我在运行 spring boot 应用程序时失败了。所以我猜这个错误来自 maven 依赖项,尤其是版本冲突。
这是我的 Maven 依赖项:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>
<dependency>
<groupId>biz.paluch.redis</groupId>
<artifactId>lettuce</artifactId>
<version>4.3.1.Final</version>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
<version>1.3.3.RELEASE</version>
</dependency>
<dependency>
<groupId>com.github.kstyrc</groupId>
<artifactId>embedded-redis</artifactId>
<version>0.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)
我试图通过在 pom.xml 中集成嵌入式 redis 依赖项来避免通知键空间事件错误,但没有成功。
注意,我在上面的 pom.xml 中添加了两个依赖,其中 artifactId 是 spring-session-data-redis 和 …
我想要json-server的test rest API.首先我用npm安装json-server,然后用以下数据创建db.json:
[
{
"id": 1,
"name": "Angular Connect",
"date": "2036-09-25T23:00:00.000Z",
"time": "10:00 am",
"price": 599.99,
"imageUrl": "/assets/images/angularconnect-shield.png",
"location": {
"address": "1057 DT",
"city": "London",
"country": "England"
},
"sessions": [
{
"id": 1,
"name": "Using Angular 4 Pipes",
"presenter": "Peter Bacon Darwin",
"duration": 1,
"level": "Intermediate",
"abstract": "Learn all about the new pipes in Angular 4, both \n how to write them, and how to get the new AI CLI to write \n them for you. Given by the …Run Code Online (Sandbox Code Playgroud)我创建了一项名为flyman-webapp 的服务:
apiVersion: v1
kind: Service
metadata:
name: fleetman-webapp
spec:
selector:
app: webapp
ports:
- name: http
port: 80
nodePort: 30080
type: NodePort
Run Code Online (Sandbox Code Playgroud)
还有一个名为webapp的 pod :
apiVersion: v1
kind: Pod
metadata:
name: webapp
labels:
app: webapp
spec:
containers:
- name: webapp
image: richardchesterwood/k8s-fleetman-webapp-angular:release0
Run Code Online (Sandbox Code Playgroud)
我检查了minikube ip:
192.168.99.102
但是当我在浏览器中输入192.168.99.102:30080 时,webapp 无法访问:
请注意,我使用的是 Ubuntu 最新版本。我进一步验证了代理和防火墙是否处于活动状态:
猫 /etc/environment:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
Run Code Online (Sandbox Code Playgroud)
iptables -L :
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy DROP) …Run Code Online (Sandbox Code Playgroud) angular ×1
java ×1
json-server ×1
kubectl ×1
kubernetes ×1
maven ×1
minikube ×1
node.js ×1
redis ×1
spring-boot ×1