This is an automated email from the ASF dual-hosted git repository.
porcelli pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-examples.git
The following commit(s) were added to refs/heads/main by this push:
new e8e98792e Add "@EnableMethodSecurity" for spring security (#1932)
e8e98792e is described below
commit e8e98792edb7e85575337fd66cc3042d33dfe501
Author: Terry <[email protected]>
AuthorDate: Tue Jun 18 20:50:42 2024 +0800
Add "@EnableMethodSecurity" for spring security (#1932)
---
.../src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java
b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java
index 2dd610093..61b13bab9 100644
---
a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java
+++
b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import
org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import
org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.crypto.password.NoOpPasswordEncoder;
@@ -30,6 +31,7 @@ import org.springframework.security.web.SecurityFilterChain;
@Configuration
@EnableWebSecurity
+@EnableMethodSecurity(jsr250Enabled = true)
public class DefaultWebSecurityConfig {
@Bean
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]