Here's a history lesson - spring-projects/spring-security#12629
http.httpBasic();
import static org.springframework.security.config.Customizer.withDefaults;
http.httpBasic(withDefaults());
http.csrf().disable();
http.csrf(csrf -> csrf.disable());
http.headers().frameOptions().disable();
http.headers(headers -> headers.frameOptions(frameOptionsConfig-> frameOptionsConfig.disable()));
header.frameOptions().sameOrigin();
header.frameOptions(frameOptionsConfig -> frameOptionsConfig.sameOrigin());
http.headers().frameOptions().sameOrigin();
http.headers(headersConfigurer -> headersConfigurer
.frameOptions(frameOptionsConfig -> frameOptionsConfig.sameOrigin()));
.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt)
import static org.springframework.security.config.Customizer.withDefaults;
.oauth2ResourceServer((oauth2) -> oauth2.jwt(withDefaults()));
http.oauth2ResourceServer((oauth2) -> oauth2.jwt(withDefaults()));
Use mysql-connector-j
instead of mysql-connector-java
Remember: groupId is a little different (
com.mysql
instead ofmysql
)
Here's a history lesson - https://blogs.oracle.com/mysql/post/mysql-connectorj-has-new-maven-coordinates
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>