@Controller
@RequestMapping("/index")
public class MainController {
@GetMapping
public String homePage(@AuthenticationPrincipal User user, Model model){
if(user != null){
model.addAttribute("user", user.getUsername());
return "/index";
} else {
model.addAttribute("user", "Аноним");
return "/index";
}
}
if(recyclerView){
progressBar.setVisibility(View.GONE);
}
progressBar.setVisibility(View.GONE);
if(recyclerView...){
progressBar.setVisibility(View.GONE);
}