Hirdetés
- Meggyi001: Áram nélkül....méltóság nélkül.....
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- f(x)=exp(x): A laposföld elmebaj: Vissza a jövőbe!
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- sziku69: Szólánc.
- Luck Dragon: Óraátállítás
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- MasterDeeJay: Intel Optane M10: mire lehet használni?
- Navaren: Resident Evil Requiem szösszenet
Ú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?:))
- Crimson Desert
- Meggyi001: Áram nélkül....méltóság nélkül.....
- EA Sports WRC '23
- A fociról könnyedén, egy baráti társaságban
- Huawei Watch GT 6 és GT 6 Pro duplateszt
- Samsung Galaxy Watch8 - Classic - Ultra 2025
- Napelem
- Xbox Series X|S
- Milyen alaplapot vegyek?
- Építő/felújító topik
- További aktív témák...
- iPhone Xr 64GB 100% ÚJ EREDETI AKKUMULÁTOR Gyűjtői darab (3hónap Garancia)
- Belépő Gaming PC! i7-8700 / RTX 3060 Ti / 16GB DDR4 / 500GB SSD / Z390 / 500w!
- LG 27G850A - 27" Nano IPS - UHD 4K - 240~480Hz 1ms - NVIDIA G-Sync - FreeSync Premium PRO - HDR 600
- iPhone 11 64GB 100% (3hónap Garancia)- AKCIÓ
- Telefon felvásárlás!! Samsung Galaxy S25, Samsung Galaxy S25 Plus, Samsung Galaxy S25 Ultra
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
