Open yanmuyuana opened 5 years ago
执行指令:mvn clean spring-boot:run 或者IDE中运行你的application类
spring.datasource.url=jdbc:mysql://localhost:3306/db_appapidemo spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.jdbc.Driver
mybatis.type-aliases-package=com.lin.appapidemo.model
mybatis.mapper-locations=classpath:mapper/*.xml
mybatis.configuration.map-underscore-to-camel-case=true
mapper.mappers=com.lin.appapidemo.util.MyMapper mapper.not-empty=false mapper.identity=MYSQL
spring.redis.database=0
spring.redis.host=your ip
spring.redis.port=6379
spring.redis.password=123456
spring.redis.pool.max-active=8
spring.redis.pool.max-wait=-1
spring.redis.pool.max-idle=8
spring.redis.pool.min-idle=0
spring.redis.timeout=0
spring.thymeleaf.cache=false
spring.mail.host=smtp.163.com spring.mail.username=your email spring.mail.password=you auth code spring.mail.default-encoding=UTF-8
建的数据库里的表应该注意什么吗?
按照appapidemo/src/main/java/com/lin/appapidemo/model/shixun/这个路径下的domain建表即可
谢谢分享
执行指令:mvn clean spring-boot:run 或者IDE中运行你的application类
application.properties放在resource文件夹下(一下是application.propertites的内容)
spring.datasource.url=jdbc:mysql://localhost:3306/db_appapidemo spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.jdbc.Driver
实体类扫描包
mybatis.type-aliases-package=com.lin.appapidemo.model
Mapper.xml文件扫描目录
mybatis.mapper-locations=classpath:mapper/*.xml
驼峰命名
mybatis.configuration.map-underscore-to-camel-case=true
tkmapper工具类
mapper.mappers=com.lin.appapidemo.util.MyMapper mapper.not-empty=false mapper.identity=MYSQL
pagehelper.helperDialect=mysql
pagehelper.reasonable=true
pagehelper.support-methods-arguments=true
pagehelper.params=count=countSql
spring-boot连接单机版Redis的配置如下:
REDIS(RedisProperties)
Redis数据库索引(默认为0)
spring.redis.database=0
Redis服务器地址
spring.redis.host=your ip
Redis服务器连接端口
spring.redis.port=6379
Redis服务器连接密码(默认为空)
spring.redis.password=123456
连接池最大连接数(使用负值表示没有限制)
spring.redis.pool.max-active=8
连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.pool.max-wait=-1
连接池中的最大空闲连接
spring.redis.pool.max-idle=8
连接池中的最小空闲连接
spring.redis.pool.min-idle=0
连接超时时间(毫秒)
spring.redis.timeout=0
页面热部署
spring.thymeleaf.cache=false
发送邮件配置
spring.mail.host=smtp.163.com spring.mail.username=your email spring.mail.password=you auth code spring.mail.default-encoding=UTF-8