title: How do I configure consistency level with Spring Boot and AWS Keyspaces?
body: <p>I hope you can help me, I am doing a crud with spring boot and keyspaces (cassandra aws), spring has the default level of Consistency level in ONE and I have not been able to write the data since I get the following error:</p>
  <pre><code>&quot;message&quot;: &quot;Query; CQL [INSERT INTO tabledemoach (address,ciiu,creation_date,email,id,name,phone,state,user_activation_status) VALUES (?,?,?,?,?,?,?,?,?)]; Consistency level LOCAL_ONE is not supported for this operation. Supported consistency levels are: LOCAL_QUORUM; nested exception is com.datastax.oss.driver.api.core.servererrors.InvalidQueryException: Consistency level LOCAL_ONE is not supported for this operation. Supported consistency levels are: LOCAL_QUORUM&quot;,
  </code></pre>
  <p>I don't know how to configure the consistency level, I have tried several solutions on the internet and none have worked for me.</p>
  <p>i have the following code</p>
  <pre><code>@Configuration
  @EnableCassandraRepositories(basePackages = &quot;com.demo&quot;)
  public class AppConfig {
  
  private final static String KEYSPACE = &quot;demo&quot;;
  
  @Primary
  public @Bean CqlSession session() {
      return CqlSession.builder().withKeyspace(KEYSPACE).build();
  }
  
  }
  
  
  @Table(value = &quot;tabledemoach&quot;)
  @Data
  public class User {
  
  @PrimaryKey
  private int id;
  private String phone;
  private String name;
  private String address;
  private String email;
  private int ciiu;
  private String state;
  private String user_activation_status;
  private LocalDate creation_date;
  } 
  
  
      @Override
      public void createUser(User user) {
      List&lt;User&gt; userFind = (List&lt;User&gt;) userRepository.findAll();
  
      var userList =userFind.stream().map(x -&gt; x.getPhone());
      var repeated = (userList.filter(x -&gt; 
      x.contains(user.getPhone()))).collect(Collectors.toList());
  
      if(repeated.size() &lt;= 0){
          userRepository.save(user);
      }
  }
  </code></pre>