Spring security does not allow CSS or JS resources to be loaded

前端 未结 7 1467
闹比i
闹比i 2020-11-29 22:45

The resource is under src/main/resources/static/css or src/main/resources/static/js, I\'m using spring boot, and the class of security is:

@Configuration
@En         


        
7条回答
  •  青春惊慌失措
    2020-11-29 23:02

    This finally worked for me. The /home (which will bring up the login page) and error messages do not need authentication. All the resources are permitAll, and the /main url is authenticated. Any other url (eg. /users /customers etc..) would need to be added as isAuthenticated()

      
            
      
           
      
      
      
    

提交回复
热议问题