springboot的配置文件application.properties详解

server.port=8080   //服务器端口号
server.servlet.context-path=/ems   // 应用程序的上下文路径。

spring.datasource.type=com.alibaba.druid.pool.DruidDataSource  //要使用的连接池实现的完全限定名称。默认情况下,它是从类路径自动检测的。
spring.datasource.driver-class-name=com.mysql.jdbc.Driver //JDBC驱动程序的完全限定名称。默认情况下,根据URL自动检测。
spring.datasource.url=jdbc:mysql://localhost:3306/ems  //数据库的JDBC url
spring.datasource.username=root  //登录数据库的用户名
spring.datasource.password=123456  //登录数据库的密码

mybatis.mapper-locations=classpath:/com/lqz/mapper/*.xml  //指定mapper.xml的路径
mybatis.type-aliases-package=com.lqz.entity  

spring.resources.static-locations=classpath:/templates,classpath:/static/

猜你喜欢

转载自www.cnblogs.com/liqinzhen/p/13208745.html