SpringBoot环境

最后更新:2024-04-11 08:24:01 | 状态:未完成
  1. 添加依赖
    <!-- Spring MVC 如果不需要web环境,那这个也不需要了-->
    <dependency>
    	<groupId>org.anyline</groupId>
    	<artifactId>anyline-mvc</artifactId>
    	<version>${anyline.version}</version>
    </dependency>
    <!-- MySQL 根据实际情况,如果用到其他库一块加上 -->
    <dependency>
    	<groupId>org.anyline</groupId>
    	<artifactId>anyline-data-jdbc-mysql</artifactId>
    	<version>${anyline.version}</version>
    </dependency>
  2. 配置数据源

    默认数据源配置

    spring.datasource.driver=com.mysql.cj.jdbc.Driver
    spring.datasource.url=jdbc:mysql://127.0.0.1:3306/al_api?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=UTC
    spring.datasource.username=root
    spring.datasource.password=root

数据库操作,参考【AnylineService
查看【版本号
如果是第一次搭建环境,注意有些以【provided形式依赖的库】,需要添加到pom中,如果是在现有项目中集成就不需要看了

最近更新 搜索 提交