springboot中的application.yaml配置 1.ContextPath配置
Spring boot默认是/ ,这样直接通过http://ip:port/就可以访问到index页面,如果要修改为http://ip:port/path/ 访问的话,那么需要在Application.properties文件中加入server.context-path = /你的path,比如:spring-boot,那么访问地址就是http://ip:port/spring-boot 路径。
其中ddl_auto: create 代表在数据库创建表 update 代表更新,首次启动需要create ,如果你想通过hibernate 注解的方式创建数据库的表的话,之后需要改为 update.
jpa:
hibernate:
ddl-auto: create
show-sql:
true