- Vezeték nélküli fülhallgatók
- Audiofil és gamer? Az ASUS megpróbálja
- AMD Ryzen 9 / 7 / 5 / 3 5***(X) "Zen 3" (AM4)
- Sony MILC fényképezőgépcsalád
- Vezetékes FEJhallgatók
- E-book olvasók
- TCL LCD és LED TV-k
- HiFi műszaki szemmel - sztereó hangrendszerek
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Milyen billentyűzetet vegyek?
Ú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?:))
- Sapphire Radeon RX Vega 56 8 GB PCI-E Videokártya
- Gigabyte B560M DS3H V2 alaplap, i5-10400 CPU, 256 GB M.2 SSD, Windows 11
- Újszerű MSI RAIDER GE66 12UH 15.6QHD IPS 240Hz i7-12700H 32GB DDR5 RAM 1TB NVME SSD RTX 3080 175w
- Apple Ipad Pro 11 M2 2022 Space Gray 128gb Wifi+Cellular 1 év garancia
- ASUS ROG STRIX G15 Gaming Laptop - Ryzen 7, 16 GB RAM, RTX 3050 Ti, 512 GB SSD
Állásajánlatok
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


