Spring Security позволяет создать пользователя, но становится недействительным на следующий день
Я относительно новичок в Java и Spring и совершенно новичок в Spring Security. У меня есть старое приложение для входа в систему, которое я сделал с помощью Spring Security, которое стало чем-то вроде приложения Франкенштейна, но оно работало. Недавно я добавил новый раздел в веб-приложение, и оно работало, но затем любой созданный мной пользователь (который работает нормально, и я могу получить доступ к моему приложению) мог войти в систему, но на следующий день он стал недействительным пользователем. Я предполагаю, что есть какой-то лимит времени пользователя, который я каким-то образом установил, и понятия не имею, как это исправить. Ниже приведено то, что я считаю проблемой, и вывод журнала в intellij. Заранее спасибо.
Конфигурация безопасности
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(securedEnabled = true)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter{
@Autowired
private UserService userService;
@Autowired
private DataSource dataSource;
@Autowired
private CustomLoginFailureHandler loginFailureHandler;
//password encoder
@Bean
public BCryptPasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
@Bean
public DaoAuthenticationProvider authenticationProvider() {
DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider();
authenticationProvider.setUserDetailsService(userService);
authenticationProvider.setPasswordEncoder(passwordEncoder());
return authenticationProvider;
}
//for remember-me function to persist to the database
@Bean
public PersistentTokenRepository persistentTokenRepository() {
JdbcTokenRepositoryImpl tokenRepo = new JdbcTokenRepositoryImpl();
tokenRepo.setDataSource(dataSource);
return tokenRepo;
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.authenticationProvider(authenticationProvider());
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers(
"/login", "/registration**", "/js/**", "/css/**","/images/**",
"/home**", "/library**", "/discgolf**", "/saveUser**", "/user-images/**").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login") //access to custom login page
.failureUrl("/login?error=true")
.failureHandler(loginFailureHandler)
.permitAll()
.defaultSuccessUrl("/home", true)
.and()
.logout()
.invalidateHttpSession(true)
.clearAuthentication(true)
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/login?logout") //navigate back to the login page with a logout message
.permitAll()
.and().rememberMe().tokenRepository(persistentTokenRepository());
}
}
CustomLoginFailureHandler
@Component
public class CustomLoginFailureHandler extends SimpleUrlAuthenticationFailureHandler {
@Autowired
private UserService userService;
@Override
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,
AuthenticationException exception) throws IOException, ServletException {
//fix username in login, should be email
String email = request.getParameter("username");
User user = userService.getUserByEmail(email);
super.setDefaultFailureUrl("/login?error");
super.onAuthenticationFailure(request, response, exception);
}
}
мвкконфиг
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
Path userUploadDir = Paths.get("./user-images");
String userUploadPath = userUploadDir.toFile().getAbsolutePath();
registry.addResourceHandler("/user-images/**").addResourceLocations("file:" + userUploadPath + "/");
}
@Bean
public AuthenticationPrincipalArgumentResolver authenticationPrincipalArgumentResolver(){
return new AuthenticationPrincipalArgumentResolver();
}
@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
argumentResolvers.add(authenticationPrincipalArgumentResolver());
}
}
UserRegistrationController
@Controller
@RequestMapping("/registration")
public class UserRegistrationController {
private UserService userService;
public UserRegistrationController(UserService userService) {
super();
this.userService = userService;
}
@ModelAttribute("user")
public User user() {
return new User();
}
@GetMapping
public String showRegistrationForm() {
return "registration";
}
@PostMapping
public String registerUserAccount(@ModelAttribute("user") User user) {
List<User> users = userService.getAllUsers();
for (User existingUser : users) {
if (existingUser.getEmail().equals(user.getEmail())){
return "redirect:/registration?error";
}
}
userService.saveUser(user);
return "redirect:/login?success";
}
}
UserServiceImpl
@Service
@Transactional
public class UserServiceImpl implements UserService {
@Autowired
private UserRepository userRepository;
@Autowired
private UserService userService;
@Autowired
private RoleRepository roleRepository;
@Autowired
private BCryptPasswordEncoder passwordEncoder;
public UserServiceImpl(UserRepository userRepository) {
super();
this.userRepository = userRepository;
}
@Override
public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {
User user = userService.getUserByEmail(email);//return user object from the database (findByEmail)
if (user == null) {
throw new UsernameNotFoundException("Invalid username or password.");
}
return new org.springframework.security.core.userdetails.User(user.getEmail(), user.getPassword(), mapRolesToAuthorities(user.getRoles()));
}
private Collection<? extends GrantedAuthority> mapRolesToAuthorities(Collection<Role> roles) {
return roles.stream().map(role -> new SimpleGrantedAuthority(role.getName())).collect(Collectors.toList());
}
@Override
public List<User> getAllUsers() {
return userRepository.findAll();
}
@Override
public int getNumberOfUsers(List<User> users) {
return userRepository.findAll().size();
}
@Override
public User saveUser(User user) {
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
String encodedPassword = encoder.encode(user.getPassword());
user.setPassword(encodedPassword);
Role roleUser = roleRepository.findByName("User");
if (user.getRoles() == null) {
user.addRole(roleUser);
}
return userRepository.save(user);
}
@Override
public User getUserById(Long id) {
Optional<User> user = userRepository.findById(id);
if(user.isPresent()){
return user.get();
} else {
throw new RuntimeException("User not found for id:" + id);
}
}
@Override
public User getUserByEmail(String email) {
User user = userRepository.findByEmail(email);
return user;
}
@Override
public void deleteUserById(Long id) {
this.userRepository.deleteById(id);
}
public List<Role> getRoles() {
return roleRepository.findAll();
}
@Override
public Page<User> findPaginatedUsers(int pageNo) {
Pageable pageable = PageRequest.of(pageNo -1, 5);
return userRepository.findAll(pageable);
}
@Override
public Page<User> findAllWithSort(String field, String direction, int pageNo) {
Sort sort = direction.equalsIgnoreCase(Sort.Direction.ASC.name())?
Sort.by(field).ascending(): Sort.by(field).descending();
Pageable pageable = PageRequest.of(pageNo - 1, 5, sort);
return userRepository.findAll(pageable);
}
public boolean isUniqueEmailViolated(Long id, String email) {
boolean isUniqueEmailViolated = false;
User userByEmail = userRepository.findByEmail(email);
boolean isCreatingNew = (id == null || id == 0);
if (isCreatingNew) {
if (userByEmail != null) isUniqueEmailViolated = true;
} else {
if (userByEmail != null) {
isUniqueEmailViolated = true;
}
}
return isUniqueEmailViolated;
}
}
Пользователь
@Entity
@Table(name = "user")
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "first_name", nullable = false)
private String firstName;
@Column(name = "last_name", nullable = false)
private String lastName;
@Column(nullable = false, unique = true)
private String email;
@Column(nullable = false)
private String password;
@Column(name = "user_image", length = 45, nullable = true)
private String userImage;
@Column(name = "failed_attempt")
private int failedAttempt;
@Column(name = "account_non_locked")
private boolean accountNonLocked;
@Column(name = "lock_time")
private Date lockTime;
//ManyToMany mapping setup between user and role
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(
name = "user_roles",
joinColumns = @JoinColumn(name = "user_id"),
inverseJoinColumns = @JoinColumn(name = "role_id")
)
private Set<Role> roles = new HashSet<>();
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(
name = "user_rounds",
joinColumns = @JoinColumn(name = "user_id"),
inverseJoinColumns = @JoinColumn(name = "round_id")
)
private Set<Round> rounds = new HashSet<>();
***Constructors getters and setters
Вывод журнала, когда недопустимый пользователь (здесь он показывает, что есть информация, связанная с этим пользователем из приложения, это приложение для гольфа, вводящее раунды, поля и результаты)
2023-02-25 14:35:34.188 DEBUG 13758 --- [nio-8080-exec-4] org.hibernate.SQL : select user0_.id as id1_7_, user0_.account_non_locked as account_2_7_, user0_.email as email3_7_, user0_.failed_attempt as failed_a4_7_, user0_.first_name as first_na5_7_, user0_.last_name as last_nam6_7_, user0_.lock_time as lock_tim7_7_, user0_.password as password8_7_, user0_.user_image as user_ima9_7_ from user user0_ where user0_.email=?
Hibernate: select user0_.id as id1_7_, user0_.account_non_locked as account_2_7_, user0_.email as email3_7_, user0_.failed_attempt as failed_a4_7_, user0_.first_name as first_na5_7_, user0_.last_name as last_nam6_7_, user0_.lock_time as lock_tim7_7_, user0_.password as password8_7_, user0_.user_image as user_ima9_7_ from user user0_ where user0_.email=?
2023-02-25 14:35:34.195 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [kayd@email.com]
2023-02-25 14:35:34.221 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([id1_7_] : [BIGINT]) - [1]
2023-02-25 14:35:34.264 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([account_2_7_] : [BOOLEAN]) - [false]
2023-02-25 14:35:34.265 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([email3_7_] : [VARCHAR]) - [kayd@email.com]
2023-02-25 14:35:34.268 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([failed_a4_7_] : [INTEGER]) - [0]
2023-02-25 14:35:34.268 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([first_na5_7_] : [VARCHAR]) - [Kayd]
2023-02-25 14:35:34.268 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([last_nam6_7_] : [VARCHAR]) - [Anderson]
2023-02-25 14:35:34.276 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([lock_tim7_7_] : [DATE]) - [null]
2023-02-25 14:35:34.276 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([password8_7_] : [VARCHAR]) - [$2a$10$3/4qtPKQwUtoDsKTHCrLDOSrABoyS8iXu6F4PVI9qJ5k0fHWQ9Pjm]
2023-02-25 14:35:34.276 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([user_ima9_7_] : [VARCHAR]) - [null]
2023-02-25 14:35:34.317 TRACE 13758 --- [nio-8080-exec-4] org.hibernate.type.CollectionType : Created collection wrapper: [com.main.library.model.User.roles#1]
2023-02-25 14:35:34.317 TRACE 13758 --- [nio-8080-exec-4] org.hibernate.type.CollectionType : Created collection wrapper: [com.main.library.model.User.rounds#1]
2023-02-25 14:35:34.337 DEBUG 13758 --- [nio-8080-exec-4] org.hibernate.SQL : select rounds0_.user_id as user_id1_9_0_, rounds0_.round_id as round_id2_9_0_, round1_.round_id as round_id1_5_1_, round1_.course_id as course_i4_5_1_, round1_.round_date as round_da2_5_1_, round1_.round_total as round_to3_5_1_, course2_.course_id as course_i1_2_2_, course2_.name as name2_2_2_, course2_.course_par as course_p3_2_2_ from user_rounds rounds0_ inner join round round1_ on rounds0_.round_id=round1_.round_id left outer join course course2_ on round1_.course_id=course2_.course_id where rounds0_.user_id=?
Hibernate: select rounds0_.user_id as user_id1_9_0_, rounds0_.round_id as round_id2_9_0_, round1_.round_id as round_id1_5_1_, round1_.course_id as course_i4_5_1_, round1_.round_date as round_da2_5_1_, round1_.round_total as round_to3_5_1_, course2_.course_id as course_i1_2_2_, course2_.name as name2_2_2_, course2_.course_par as course_p3_2_2_ from user_rounds rounds0_ inner join round round1_ on rounds0_.round_id=round1_.round_id left outer join course course2_ on round1_.course_id=course2_.course_id where rounds0_.user_id=?
2023-02-25 14:35:34.338 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1]
2023-02-25 14:35:34.360 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([round_id1_5_1_] : [BIGINT]) - [1]
2023-02-25 14:35:34.360 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([course_i1_2_2_] : [BIGINT]) - [1]
2023-02-25 14:35:34.360 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([course_i4_5_1_] : [BIGINT]) - [1]
2023-02-25 14:35:34.394 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([round_da2_5_1_] : [TIMESTAMP]) - [2023-02-23 00:00:00.0]
2023-02-25 14:35:34.395 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([round_to3_5_1_] : [INTEGER]) - [22]
2023-02-25 14:35:34.396 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([name2_2_2_] : [VARCHAR]) - [Legende]
2023-02-25 14:35:34.396 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([course_p3_2_2_] : [INTEGER]) - [27]
2023-02-25 14:35:34.396 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([user_id1_9_0_] : [BIGINT]) - [1]
2023-02-25 14:35:34.396 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([round_id2_9_0_] : [BIGINT]) - [1]
2023-02-25 14:35:34.407 TRACE 13758 --- [nio-8080-exec-4] org.hibernate.type.CollectionType : Created collection wrapper: [com.main.discgolf.model.Round.scores#1]
2023-02-25 14:35:34.408 TRACE 13758 --- [nio-8080-exec-4] org.hibernate.type.CollectionType : Created collection wrapper: [com.main.discgolf.model.Course.holes#1]
2023-02-25 14:35:34.409 DEBUG 13758 --- [nio-8080-exec-4] org.hibernate.SQL : select roles0_.user_id as user_id1_8_0_, roles0_.role_id as role_id2_8_0_, role1_.id as id1_4_1_, role1_.name as name2_4_1_ from user_roles roles0_ inner join role role1_ on roles0_.role_id=role1_.id where roles0_.user_id=?
Hibernate: select roles0_.user_id as user_id1_8_0_, roles0_.role_id as role_id2_8_0_, role1_.id as id1_4_1_, role1_.name as name2_4_1_ from user_roles roles0_ inner join role role1_ on roles0_.role_id=role1_.id where roles0_.user_id=?
2023-02-25 14:35:34.409 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1]
2023-02-25 14:35:34.564 DEBUG 13758 --- [nio-8080-exec-4] org.hibernate.SQL : select user0_.id as id1_7_, user0_.account_non_locked as account_2_7_, user0_.email as email3_7_, user0_.failed_attempt as failed_a4_7_, user0_.first_name as first_na5_7_, user0_.last_name as last_nam6_7_, user0_.lock_time as lock_tim7_7_, user0_.password as password8_7_, user0_.user_image as user_ima9_7_ from user user0_ where user0_.email=?
Hibernate: select user0_.id as id1_7_, user0_.account_non_locked as account_2_7_, user0_.email as email3_7_, user0_.failed_attempt as failed_a4_7_, user0_.first_name as first_na5_7_, user0_.last_name as last_nam6_7_, user0_.lock_time as lock_tim7_7_, user0_.password as password8_7_, user0_.user_image as user_ima9_7_ from user user0_ where user0_.email=?
2023-02-25 14:35:34.564 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [VARCHAR] - [kayd@email.com]
2023-02-25 14:35:34.565 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([id1_7_] : [BIGINT]) - [1]
2023-02-25 14:35:34.565 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([account_2_7_] : [BOOLEAN]) - [false]
2023-02-25 14:35:34.565 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([email3_7_] : [VARCHAR]) - [kayd@email.com]
2023-02-25 14:35:34.565 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([failed_a4_7_] : [INTEGER]) - [0]
2023-02-25 14:35:34.565 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([first_na5_7_] : [VARCHAR]) - [Kayd]
2023-02-25 14:35:34.565 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([last_nam6_7_] : [VARCHAR]) - [Anderson]
2023-02-25 14:35:34.566 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([lock_tim7_7_] : [DATE]) - [null]
2023-02-25 14:35:34.566 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([password8_7_] : [VARCHAR]) - [$2a$10$3/4qtPKQwUtoDsKTHCrLDOSrABoyS8iXu6F4PVI9qJ5k0fHWQ9Pjm]
2023-02-25 14:35:34.566 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([user_ima9_7_] : [VARCHAR]) - [null]
2023-02-25 14:35:34.566 TRACE 13758 --- [nio-8080-exec-4] org.hibernate.type.CollectionType : Created collection wrapper: [com.main.library.model.User.roles#1]
2023-02-25 14:35:34.566 TRACE 13758 --- [nio-8080-exec-4] org.hibernate.type.CollectionType : Created collection wrapper: [com.main.library.model.User.rounds#1]
2023-02-25 14:35:34.566 DEBUG 13758 --- [nio-8080-exec-4] org.hibernate.SQL : select rounds0_.user_id as user_id1_9_0_, rounds0_.round_id as round_id2_9_0_, round1_.round_id as round_id1_5_1_, round1_.course_id as course_i4_5_1_, round1_.round_date as round_da2_5_1_, round1_.round_total as round_to3_5_1_, course2_.course_id as course_i1_2_2_, course2_.name as name2_2_2_, course2_.course_par as course_p3_2_2_ from user_rounds rounds0_ inner join round round1_ on rounds0_.round_id=round1_.round_id left outer join course course2_ on round1_.course_id=course2_.course_id where rounds0_.user_id=?
Hibernate: select rounds0_.user_id as user_id1_9_0_, rounds0_.round_id as round_id2_9_0_, round1_.round_id as round_id1_5_1_, round1_.course_id as course_i4_5_1_, round1_.round_date as round_da2_5_1_, round1_.round_total as round_to3_5_1_, course2_.course_id as course_i1_2_2_, course2_.name as name2_2_2_, course2_.course_par as course_p3_2_2_ from user_rounds rounds0_ inner join round round1_ on rounds0_.round_id=round1_.round_id left outer join course course2_ on round1_.course_id=course2_.course_id where rounds0_.user_id=?
2023-02-25 14:35:34.567 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1]
2023-02-25 14:35:34.568 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([round_id1_5_1_] : [BIGINT]) - [1]
2023-02-25 14:35:34.568 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([course_i1_2_2_] : [BIGINT]) - [1]
2023-02-25 14:35:34.569 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([course_i4_5_1_] : [BIGINT]) - [1]
2023-02-25 14:35:34.569 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([round_da2_5_1_] : [TIMESTAMP]) - [2023-02-23 00:00:00.0]
2023-02-25 14:35:34.569 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([round_to3_5_1_] : [INTEGER]) - [22]
2023-02-25 14:35:34.569 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([name2_2_2_] : [VARCHAR]) - [Legende]
2023-02-25 14:35:34.569 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([course_p3_2_2_] : [INTEGER]) - [27]
2023-02-25 14:35:34.570 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([user_id1_9_0_] : [BIGINT]) - [1]
2023-02-25 14:35:34.570 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicExtractor : extracted value ([round_id2_9_0_] : [BIGINT]) - [1]
2023-02-25 14:35:34.570 TRACE 13758 --- [nio-8080-exec-4] org.hibernate.type.CollectionType : Created collection wrapper: [com.main.discgolf.model.Round.scores#1]
2023-02-25 14:35:34.570 TRACE 13758 --- [nio-8080-exec-4] org.hibernate.type.CollectionType : Created collection wrapper: [com.main.discgolf.model.Course.holes#1]
2023-02-25 14:35:34.571 DEBUG 13758 --- [nio-8080-exec-4] org.hibernate.SQL : select roles0_.user_id as user_id1_8_0_, roles0_.role_id as role_id2_8_0_, role1_.id as id1_4_1_, role1_.name as name2_4_1_ from user_roles roles0_ inner join role role1_ on roles0_.role_id=role1_.id where roles0_.user_id=?
Hibernate: select roles0_.user_id as user_id1_8_0_, roles0_.role_id as role_id2_8_0_, role1_.id as id1_4_1_, role1_.name as name2_4_1_ from user_roles roles0_ inner join role role1_ on roles0_.role_id=role1_.id where roles0_.user_id=?
2023-02-25 14:35:34.571 TRACE 13758 --- [nio-8080-exec-4] o.h.type.descriptor.sql.BasicBinder : binding parameter [1] as [BIGINT] - [1]