小编Dav*_*ave的帖子

春季靴+ cassandra

我开始学习cassandra,我想连接Spring启动框架,但是我误解了很多错误.我第一次花了一整天的时间来理解我必须使用Cassandra 2.xx版本而不是3.xx,因为Spring数据Cassandra不支持它.所以我删除了maven中的任何版本并运行!我第二次和上次完全一样,但我又遇到了一些错误,难道还是什么?我什么都听不懂!请告诉我一些人.

的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>com.libra</groupId>
    <artifactId>libra</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>libra</name>
    <description>Demo project for Spring Boot</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.3.3.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-cassandra</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jersey</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>


</project>
Run Code Online (Sandbox Code Playgroud)

Config Cassandra

package com.libra.configs;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.cassandra.config.SchemaAction;
import org.springframework.data.cassandra.config.java.AbstractCassandraConfiguration;
import org.springframework.data.cassandra.convert.MappingCassandraConverter; …
Run Code Online (Sandbox Code Playgroud)

configuration cassandra spring-boot spring-data-cassandra

5
推荐指数
1
解决办法
5015
查看次数

使用Spring Boot的微服务中的安全问题

我在春季启动(和一般)的微服务中误解了安全性.我想使用Spring框架和微服务构建一个项目,但在架构规划中我陷入了困境.微服务中的安全性应该如何?在我看来,在所有项目中应该是一个组件,所有请求都抛出组件并传播到其他组件.我可以找到它是Spring Cloud Zuul,它是微服务中的api网关,我有想法制作一个响应网关的项目,并在组件中增加安全性.我的意思是它将类似于包含Spring Cloud Zuul,Spring Security,Spring Data JPA依赖项的项目.您认为提供安全性的好方法如何?有可能建立这样的东西吗?

java spring spring-mvc spring-security spring-cloud

4
推荐指数
1
解决办法
1035
查看次数