1需要下载IntelliJ IDEA 2025.3.3工具
2需要下载MySql数据库,图形化软件navicat
3遇到问题 pom文件依赖资源爆红
解决:需要一个一个的放入解决,不要一下子复制很多
4用postman测试接口不返回问题
This generated password is for development use only. Your security configuration must be updated before running your application in production.
解决:增加安全配置
java
@Configuration
@EnableWebSecurity
public class SecurityConfig {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.csrf(csrf -> csrf.disable()) // 禁用 CSRF(开发环境)
.authorizeHttpRequests(auth -> auth
.requestMatchers("/user/**").permitAll() // 放行用户接口
.anyRequest().authenticated()
);
return http.build();
}
}