您当前的位置: 首页 > 

qq_34412985

暂无认证

  • 0浏览

    0关注

    1061博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

application.properties文件配置

qq_34412985 发布时间:2019-12-23 16:41:47 ,浏览量:0

一、配置mysql连接

    spring.datasource.url = jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC     spring.datasource.username = root     spring.datasource.password = root     spring.datasource.driverClassName = com.mysql.jdbc.Driver     spring.datasource.max-active=20     spring.datasource.max-idle=8     spring.datasource.min-idle=8     spring.datasource.initial-size=10

二、配置JPA

    # Specify the DBMS     spring.jpa.database = MYSQL     # Show or not log for each sql query     spring.jpa.show-sql = true     # Hibernate ddl auto (create, create-drop, update)     spring.jpa.hibernate.ddl-auto = update     # Naming strategy     #[org.hibernate.cfg.ImprovedNamingStrategy  #org.hibernate.cfg.DefaultNamingStrategy]     spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy     # stripped before adding them to the entity manager)     spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect      

三、配置server

    #server.port=8080     #server.address= # bind to a specific NIC     #server.session-timeout= # session timeout in seconds     #the context path, defaults to '/'     #server.context-path=/spring-boot     #server.servlet-path= # the servlet path, defaults to '/'     #server.tomcat.access-log-pattern= # log pattern of the access log     #server.tomcat.access-log-enabled=false # is access logging enabled     #server.tomcat.protocol-header=x-forwarded-proto # ssl forward headers     #server.tomcat.remote-ip-header=x-forwarded-for     #server.tomcat.basedir=/tmp # base dir (usually not needed, defaults to tmp)     #server.tomcat.background-processor-delay=30; # in seconds     #server.tomcat.max-threads = 0 # number of threads in protocol handler     #server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding

四、时间格式

spring.jackson.date-format=yyyy-MM-dd HH:mm:ss

关注
打赏
1653291990
查看更多评论
立即登录/注册

微信扫码登录

1.0935s