Ú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?:))
- Kés topik
- Milyen billentyűzetet vegyek?
- Xiaomi 15T - reakció nélkül nincs egyensúly
- Kerékpárosok, bringások ide!
- PLC programozás
- Windows 10
- Elektromos autók - motorok
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Gaming notebook topik
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- További aktív témák...
- HP ProBook 640 G8 14" Core-i3 3.00GHz / 8GB RAM / 256GB SSD / Win10 Pro
- Apple iPhone 11 128GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 15 128GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 15 Pro 256GB, Kártyafüggetlen, 1 Év Garanciával
- Eladó MacBook Pro 13 (M1, 2020) Ezüst / 8GB / 256GB Magyar bill. újszerű
- MSI 14 Modern C12M FHD IPS i7-1255U 10mag 16GB 512GB SSD Intel Iris XE Graphics Win11 Garancia
- í kilenc! AKCIÓS PRECÍZIÓS KÉSZÜLÉK! 7670 i9-12950HX 64GB RAM 1TB SSD Nvidia RTX A3000 12GB 1 év gar
- DELL UltraSharp U2722DE 27" monitor QHD LCD IPS 27% ÁFÁs
- Ulefone Armor Pad 5 Pro
Á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

