惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
博客园 - 【当耐特】
Cyberwarzone
Cyberwarzone
B
Blog
U
Unit 42
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 叶小钗
F
Full Disclosure
Microsoft Azure Blog
Microsoft Azure Blog
Recorded Future
Recorded Future
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
云风的 BLOG
云风的 BLOG
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
C
CERT Recently Published Vulnerability Notes
F
Fortinet All Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cisco Blogs
The Hacker News
The Hacker News
Know Your Adversary
Know Your Adversary
S
Securelist
S
Schneier on Security
P
Privacy International News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
AWS News Blog
AWS News Blog
J
Java Code Geeks
T
The Exploit Database - CXSecurity.com
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
C
Cybersecurity and Infrastructure Security Agency CISA
H
Heimdal Security Blog
博客园 - Franky
P
Palo Alto Networks Blog
PCI Perspectives
PCI Perspectives
T
Tailwind CSS Blog
IT之家
IT之家
Engineering at Meta
Engineering at Meta
Latest news
Latest news
P
Proofpoint News Feed
量子位
Apple Machine Learning Research
Apple Machine Learning Research
K
Kaspersky official blog

博客园 - 一贴灵

DOCKER 学习笔记 关于企业自建AI Qwen-Agent是一个开发框架 python 换源方法 qwen3-0.6B初探 设备虐我千百遍,AI待我如初恋 蓝凌OA流程附件 蓝凌OA 流程管理数据结构字典(km_review_main) Windows 包管理器:chocolatey 配置 npm 国内镜像(重要!) OpenTalking 负责实时数字人编排 readme pip install -e ".[dev]"的文件在pyproject.toml或 setup.py​ 里 CC SWITCH配置百练的token plan给 claude pgsql 带转义符的更新,$$ '更新内容'$$ 新手提效必看!Claude Code只需这九个Skills(转) 技术要用来向善:水印机机 与盲水印 另类文件备份方法 转:PostgreSQL向量检索:pgvector入门指南 设置pip全局镜像源(国内加速) Chroma数据库入门到进阶教程(转) pip install 使用国内镜像安装加快速度 调整指标达成插入yjlx表的sql OpenClaw 的 select channel中没有直接显示微信选项怎么办? openrouter 免费API-KEY hermes安装笔记 Winform程序中NumberUpdown控件作为年月选择框的代码增强 Claude code简版使用手册 白嫖API-KEY汇总 OpenClaw安装中提示:systemctl --user unavailable:错误处理 SQL 行数据生成器 用友 主要库及表 网传免费TOKEN PaddleOCR本地部署指南:Windows环境下的OCR服务搭建实践 python虚拟环境建议及激活 删除 winform表单中datagridview实现EXCEL式列筛选 和零售/新零售有关的英文缩写(转) Windows系统下顺利安装并运行OpenClaw Gradio入门快速搭建AI算法可视化部署演示(以使用OCR模型unirec为例)(转) 转:魔搭社区每天免费提供2000次Claude Code调用 查询 PostgreSQL 当前连接数的常用方法 PyInstaller 是将你的 Python 打包成一个独立的可执行文件 大叔学springboot ,且学且记
idea+sprinboot+postgres创建WEB项目
一贴灵 · 2026-01-28 · via 博客园 - 一贴灵

1、新建项目

image

 2选择SpringBoot 版本和需要的依赖。新手要注意与jdk的版本要一致。(jdk1.8+springboot2.6.13)

image

 3创建模块,(设置--项目结构--项目设置--模块,点右边的 + 号)

image

 附:

 pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.lingrui</groupId>
    <artifactId>admin</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>admin</name>
    <description>admin</description>
    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <spring-boot.version>2.7.12</spring-boot.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <!-- Spring Boot JPA启动器 - 提供ORM相关功能 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <!-- Spring Boot Web启动器 - 提供Web开发相关功能 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- PostgreSQL数据库驱动 - 用于连接PostgreSQL数据库 -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>  <!-- 运行时依赖,编译时不需要 -->
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring-boot.version}</version>
                <configuration>
                    <mainClass>com.lingrui.admin.AdminApplication</mainClass>
                    <skip>true</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>repackage</id>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

application.yml

server:
  port: 8099
# Spring框架配置
spring:
  # 数据源配置 - 连接数据库的相关设置
  datasource:
    # 数据库连接URL,指定数据库类型、主机地址、端口和数据库名
    url: jdbc:postgresql://localhost:5432/clientinfo
    # 数据库用户名
    username: postgres
    # 数据库密码
    password: 123456
    # 数据库驱动类名
    driver-class-name: org.postgresql.Driver

  # JPA配置 - Java持久化API相关设置
  jpa:
    # Hibernate配置 - ORM框架相关设置
    hibernate:
      # DDL自动更新策略,update表示根据实体类自动更新数据库表结构
      ddl-auto: update
    # 是否在控制台显示SQL语句
    show-sql: true
    # Hibernate属性配置
    properties:
      hibernate:
        # 指定Hibernate方言,用于生成特定数据库的SQL语句
        dialect: org.hibernate.dialect.PostgreSQLDialect