Hirdetés
- iPhone topik
- Sony Xperia 1 V - kizárólag igényeseknek
- Xiaomi 15T Pro - a téma nincs lezárva
- Xiaomi 15T - reakció nélkül nincs egyensúly
- Yettel topik
- Samsung Galaxy S24 Ultra - ha működik, ne változtass!
- Samsung Galaxy S23 Ultra - non plus ultra
- OnePlus 15 - van plusz energia
- Vivo X200 Pro - a kétszázát!
- Vivo X300 Pro – messzebbre lát, mint ameddig bírja
Ú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?:))
- Apple iPhone SE 2020 64GB független, fekete
- ÁRGARANCIA!Épített KomPhone Ryzen 7 7700X 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- iking - Apple iPhone 14 Pro Graphite ProMotion 120 Hz, 48 MP kamera, Dynamic Island 128 GB
- Apple iPhone 15 Pro / 256GB / Kártyafüggetlen / 12Hó Garancia / Akku: 88%
- GYÖNYÖRŰ iPhone 13 Mini 128GB Pink-1 ÉV GARANCIA -Kártyafüggetlen, MS3823, 100% Akkumulátor
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopszaki Kft.
Város: Budapest


