Initial commit with basic CRUD functionality:

* GET all properties
* GET one property by id
* CREATE one property
* DELETE one property by id
This commit is contained in:
2025-08-25 14:06:29 +02:00
commit 7be4c611b3
19 changed files with 867 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package de.iwomm.propify_api.security;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
@EnableWebSecurity
public class SecurityConfig {
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
.csrf(csrf -> csrf.disable()) // CSRF deaktivieren für APIs
.authorizeHttpRequests(auth -> auth
.requestMatchers("/api/**").permitAll() // API ist offen
.anyRequest().permitAll() // Alles andere auch offen
)
.httpBasic(httpBasic -> httpBasic.disable()) // Kein Basic Auth
.formLogin(form -> form.disable()); // Kein Login-Formular
return http.build();
}
}