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

推荐订阅源

大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
H
Help Net Security
P
Privacy & Cybersecurity Law Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Help Net Security
Help Net Security
Hugging Face - Blog
Hugging Face - Blog
D
Docker
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V2EX - 技术
V2EX - 技术
人人都是产品经理
人人都是产品经理
L
LINUX DO - 最新话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google Online Security Blog
Google Online Security Blog
博客园 - 聂微东
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Blog — PlanetScale
Blog — PlanetScale
C
Cisco Blogs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Know Your Adversary
Know Your Adversary
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
Webroot Blog
Webroot Blog
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
Recent Commits to openclaw:main
Recent Commits to openclaw:main
The Register - Security
The Register - Security
Simon Willison's Weblog
Simon Willison's Weblog
A
Arctic Wolf
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
Y
Y Combinator Blog
Last Week in AI
Last Week in AI
S
Securelist
Cloudbric
Cloudbric
G
GRAHAM CLULEY
M
MIT News - Artificial intelligence
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Visual Studio Blog
S
Schneier on Security
Engineering at Meta
Engineering at Meta

博客园 - 一贴灵

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