[springboot] sprinboot与spring data JPA整合配置文件(及pom文件依赖)

搭配使用
mybatis与springboot整合的配置文件(application.properties):
https://blog.csdn.net/a755199443/article/details/91399442

sprinboot与spring data JPA整合配置文件
文件名:application.properties

#配置数据源
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/ssm
spring.datasource.username=root
spring.datasource.password=root

#配置连接池
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource

#配置映射文件别名
mybatis.type-aliases-package=com.bjsxt.pojo

#配置springDataJPA相关设置
#配置正向工程
spring.jpa.hibernate.ddl-auto=update
#显示sql语句
spring.jpa.show-sql=truel

pom文件添加依赖:

    <dependencies>
        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-webartifactId>
        dependency>
        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-thymeleafartifactId>
        dependency>
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-data-jpaartifactId>
        dependency>
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-testartifactId>
        dependency>
        
        <dependency>
            <groupId>mysqlgroupId>
            <artifactId>mysql-connector-javaartifactId>
        dependency>
        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>druidartifactId>
            <version>1.0.9version>
        dependency>
    dependencies>

你可能感兴趣的:(配置文件,配置文件整理)