Hirdetés
- Lalikiraly: Macbook NEO 2
- Luck Dragon: Asszociációs játék. :)
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Mr Dini: Mindent a StreamSharkról!
- D@reeo: OlvasóMester - vágólap felolvasó alkalmazás
- hcl: GPT diszk kisebbre klónozása
- t1csi: DDR3 RAM vadászat – egy kis gondolkodási anomália
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- sziku69: Fűzzük össze a szavakat :)
- sziku69: Szólánc.
Ú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?:))
- iMac Pro 27" 2017, Xeon W-2191B 18 core, 64 GB RAM, 8 GB GPU, 1 TB SSD - 27% Áfás (0441AB)
- AKCIÓ! Palit Gaming Pro RTX 3070 Ti 8GB videokártya garanciával hibátlan működéssel
- Számítógép javítás Budapest Laptop szerviz WiFi és router beállítás
- Azonnali készpénzes INTEL CPU NVIDIA VGA számítógép felvásárlás személyesen / postával korrekt áron
- BESZÁMÍTÁS! Gigabyte H510M i5 10400F 32GB DDR4 512GB SSD GTX 1070 8GB ZALMAN N4 Corsair 550W
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
