后端开发(自己写接口,从0到1)

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();
    }
}
相关推荐
2601_962284177 天前
欧洲转码指南:后端、前端与全栈开发解析
前端开发·devops·后端开发·全栈开发·欧洲转码指南
秋饼7 天前
Spring AI 2.0 接入 DeepSeek V4.1 Flash 生产级实战
java·ai·技术分享·后端开发
秋饼7 天前
Spring AI 2.0 企业级文档ETL实战:从 DocumentReader 到 EmbeddingStore 的完整知识库数据管道
java·ai·技术分享·后端开发
2601_962301018 天前
缓存知识点总结
缓存·知识点·总结·后端开发·面试复习
Javatutouhouduan9 天前
Java如何速通性能优化难题?
java·java面试·jvm调优·后端开发·java程序员·java八股文·java性能优化
秋饼9 天前
Spring AI 2.0 多模型路由网关:Astra/Sol 到国产模型的智能调度与降级
java·ai·技术分享·后端开发
青 春 记 忆11 天前
零基础入门python70:Docker Compose 编排完整后端
python·后端开发
青 春 记 忆11 天前
零基础入门python66:FastAPI AI标题、摘要和标签
python·fastapi·后端开发
青 春 记 忆11 天前
零基础入门python65:FastAPI 安全调用大模型API
python·fastapi·后端开发
青 春 记 忆11 天前
零基础入门python68:FastAPI 完整博客运行与项目验收
python·fastapi·后端开发