Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Problem on configuring Vaadin managed Spring Security with Vaadin4Spring ex

Abel Haman
6 years ago Oct 13, 2015 9:46am
Koenraad Van Acker
6 years ago Oct 13, 2015 7:56pm

Hi,

You could try moving your autowiring of the userService & passwordEncoder into the configuration:

...  

  /**
     * Configure the authentication manager.
     */
    @Configuration  
    class AuthenticationConfiguration implements AuthenticationManagerConfigurer {

        @Autowired
        private UserService userService;
    
        @Autowired
        private CmPasswordEncoder passwordEncoder;

        @Override
        public void configure(AuthenticationManagerBuilder auth) throws Exception {            
           auth.userDetailsService(userService).passwordEncoder(passwordEncoder);
        }  

    

I made a similar proof of concept based on the vaadin4spring security-sample-managed, UserDetailService and Spring Data JPA. It is really working fine.

Cheers,
Koenraad

 

Abel Haman
6 years ago Oct 14, 2015 6:39am