es.davy.ai

Preguntas y respuestas de programación confiables

¿Tienes una pregunta?

Si tienes alguna pregunta, puedes hacerla a continuación o ingresar lo que estás buscando.

Tag: FLUENT-NHIBERNATE

Error al crear el bean con el nombre ‘securityConfig’: El bean solicitado se encuentra actualmente en creación.

package ro.contabilitateexpert.AccountExpert.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.BeanIds; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private UserDetailsService userDetailsService; @Bean(BeanIds.AUTHENTICATION_MANAGER) @Override public AuthenticationManager authenticationManagerBean() throws Exception { return super.authenticationManagerBean(); } @Override public void configure(HttpSecurity . . . Read more

Hibernate lazy fetching Hibernate recuperación perezosa

Tengo 3 entidades, por ejemplo Categoría, SubCategoría y Curso. Una categoría puede tener muchas subcategorías y una subcategoría puede tener muchos cursos. He creado relaciones de uno a muchos entre categoría-subcategoría y subcategoría-curso utilizando Fetch.Lazy. class Category { @OneToMany(mappedBy = “category”) private Set<SubCategory> subCategories = new HashSet<>(); } <p>class SubCategory . . . Read more