Coder Social home page Coder Social logo

springboot_docker's Introduction

buiduc

22/7/2023 1.the project have a problem in SecurutyConfig i don't have any solution for import websecurity . 2. I Δ‘on't have anyway using it like a web page with html . i can't connect with service layer . thanks for all. 23/7 someone else help me this method in securityconfig.java in src/java/project/. and nice to meet you : @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.authorizeRequests() .requestMatchers("/login").permitAll() // Allow access to login page without authentication .requestMatchers("/dashboard").hasRole("USER") // Require "USER" role to access the dashboard .requestMatchers("/admin").hasRole("ADMIN") // Require "ADMIN" role to access the admin page .anyRequest().authenticated() .and() .formLogin() .loginPage("/login") // Specify the custom login page URL .defaultSuccessUrl("/dashboard") // Redirect to the dashboard after successful login .and() .logout() .logoutUrl("/logout") // Specify the custom logout URL .logoutSuccessUrl("/login") // Redirect to the login page after successful logout .invalidateHttpSession(true) .deleteCookies("JSESSIONID"); // http.headers(null).frameOptions().Origin(); return http.build(); this method have a froblem about : The method authorizeRequests() from the type HttpSecurity is deprecated The method permitAll() from the type ExpressionUrlAuthorizationConfigurer.AuthorizedUrl is deprecated The method hasRole(String) from the type ExpressionUrlAuthorizationConfigurer.AuthorizedUrl is deprecated The method hasRole(String) from the type ExpressionUrlAuthorizationConfigurer.AuthorizedUrl is deprecated The method authenticated() from the type ExpressionUrlAuthorizationConfigurer.AuthorizedUrl is deprecated The method and() from the type ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry is deprecated The method formLogin() from the type HttpSecurity has been deprecated since version 6.1 and marked for removal The method and() from the type SecurityConfigurerAdapter<DefaultSecurityFilterChain,HttpSecurity> has been deprecated since version 6.1 and marked for removal The method logout() from the type HttpSecurity has been deprecated since version 6.1 and marked for removal

springboot_docker's People

Contributors

buiduc9918 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.