package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.csrf.CsrfFilter;
import org.springframework.security.web.csrf.CsrfTokenRepository;
import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

@SpringBootApplication
@EnableRedisHttpSession
public class UiApplication extends WebSecurityConfigurerAdapter {

    public static void main(String[] args) {
        SpringApplication.run(UiApplication.class, args);
    }
}

@@ -614,16 +614,79 @@
 Session;
+%0Aimport org.springframework.web.bind.annotation.RestController;
 %0A%0A@Sprin
@@ -702,16 +702,32 @@
 ication%0A
+@RestController%0A
 @EnableR
@@ -742,16 +742,16 @@
 Session%0A
-
 public c
@@ -809,16 +809,273 @@
 pter %7B%0A%0A
+    @Override%0A    protected void configure(HttpSecurity http) throws Exception %7B%0A        http%0A            .httpBasic()%0A        .and()%0A            .authorizeRequests().antMatchers(%22/index.html%22, %22/%22).permitAll()%0A        .anyRequest().hasRole(%22USER%22);%0A    %7D%0A%0A
     publ

add security settings