Hirdetés
- leslieke: leslieke farmerzsebe
- Luck Dragon: Asszociációs játék. :)
- GoodSpeed: Munkaügyi helyzet Hajdú-Biharban: észak és dél!
- sziku69: Fűzzük össze a szavakat :)
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- sziku69: Szólánc.
- gban: Ingyen kellene, de tegnapra
- hcl: ReaR backup
- Magga: PLEX: multimédia az egész lakásban
- hcl: Mér' nem mér?
Új hozzászólás Aktív témák
-
Csaby25
őstag
Sziasztok!
package com.sec.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@EnableGlobalMethodSecurity(securedEnabled = true)
@Configuration
public class SecurityConf extends WebSecurityConfigurerAdapter{
@Autowired
public void configureAuth(AuthenticationManagerBuilder auth) throws Exception {
auth
.inMemoryAuthentication()
.withUser("sfjuser")
.password("{noop}pass")
.roles("USER")
.and()
.withUser("sfjadmin")
.password("{noop}pass")
.roles("ADMIN");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("admin/**").hasRole("ADMIN")
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/login.html")
.permitAll()
.and()
.logout()
.logoutSuccessUrl("/login?logout")
.permitAll();
}
}Nem találja a login.html-t, pedig a templates mappában van. Van ötletetek miért?
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- JBL STAGE 2 9634
- ÁRGARANCIA!Épített KomPhone i5 14400F 32/64GB RAM RX 9060 XT 16GB GAMER PC termékbeszámítással
- 188 - Lenovo LOQ (15IRX10) - Intel Core i5-13450HX, RTX 5060
- ÚJ MSI CYBORG 15 A13VF - 15.6"FHD 144Hz - i5-13420H - 16GB - 512GB - Win11 - RTX 4060 -3 év garancia
- Bomba ár! HP EliteBook 830 G8 - i5-1135G7 I 8GB I 256SSD I HDMI I 13,3" FHD I Cam I W11 I Gari!
Állásajánlatok
Cég: BroadBit Hungary Kft.
Város: Budakeszi
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest

