#加载现有的 Spring XML 配置,以改动最小。后面再逐步迁移到 Java 配置 #spring.config.import=classpath:beanRefContext.xml #bean 'videoManager'有重复定义,需要覆盖。后面要禁用覆盖特性 spring.main.allow-bean-definition-overriding=true spring.main.web-application-type=servlet #spring.main.web-application-type=none spring.mvc.pathmatch.matching-strategy=ant_path_matcher spring.main.allow-circular-references=true logging.level.org.hibernate.engine.internal.StatisticalLoggingSessionEventListener=warn #logging.level.org.springframework=DEBUG #logging.level.org.springframework.jdbc.datasource=DEBUG logging.level.org.hibernate.SQL=DEBUG #logging.level.org.directwebremoting=DEBUG #logging.level.com.mchange.v2=DEBUG #logging.level.org.hibernate.SQL=DEBUG #logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE #logging.level.org.hibernate.cfg.annotations.EntityBinder=DEBUG # Turn on debug logging for Hikari (if you use the default Hikari pool) #logging.level.com.zaxxer.hikari=DEBUG # (Optional) Further debug logging for Spring’s JDBC auto‐configuration #logging.level.org.springframework.boot.autoconfigure.jdbc=DEBUG #logging.level.org.springframework=TRACE #server.servlet.register-default-servlet=false #logging.level.org.hibernate.dialect=WARN #设置上传文件最大为50MB spring.servlet.multipart.max-file-size=50MB spring.servlet.multipart.max-request-size=500MB #debug=true # server server.port=80 server.servlet.context-path=/ #设置 JSP 根路径,即 src/main/webapp/ 目录 spring.mvc.view.prefix=/ #确保 .jsp 文件可以被解析。 spring.mvc.view.suffix=.jsp #避免静态资源解析冲突。 spring.mvc.static-path-pattern=/** spring.web.resources.static-locations=classpath:/static/,file:src/main/webapp/ cxf.path=/services cxf.jaxrs.server.base-path=/rest # data source #spring.datasource.url=jdbc:sqlserver://localhost:1433;databaseName=gzfdzlSterile #spring.datasource.username=sa #spring.datasource.password=p2ssword #spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver # JPA config ### 指定是否需要在日志中显示SQL语句 spring.jpa.show-sql=true ### 指定自动创建|更新|验证数据库表结构等配置,配置成update ### 表示如果数据库中存在持久化类对应的表就不创建,不存在就创建对应的表 spring.jpa.hibernate.ddl-auto=update #指定数据库的方言 #oralce:org.hibernate.dialect.Oracle10gDialect #SQL Server2008:org.hibernate.dialect.SQLServerDialect #SQL Server2012:org.hibernate.dialect.SQLServer2012Dialect #MySQL 5.x:org.hibernate.dialect.MySQL5Dialect spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect ############################################################################## ### 项目属性配置 ############################################################################## #spring.thymeleaf.cache=false project=demo database=sqlserver ############################################################################ ### 数据源配置 ############################################################################ # 数据库地址 #spring.datasource.url=jdbc:sqlserver://localhost:1433;databaseName=test spring.datasource.url=jdbc:sqlserver://localhost:1433;databaseName=gzfdzlSterile;encrypt=false;characterEncoding=UTF-8;sendStringParametersAsUnicode=true ## 用户名 spring.datasource.username=c2E= ## 密码 spring.datasource.password=cDJzc3dvcmQ= ## 数据库驱动 spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver ### 指定连接池中最大的活跃连接数 #spring.datasource.tomcat.max-active=20 ### 指定数据库最大的空闲连接 #spring.datasource.tomcat.max-idle=8 ### 指定必须保持连接的最小值 #spring.datasource.tomcat.min-idle=8 ### 指定启动连接池时,初始建立的连接数量 #spring.datasource.tomcat.initial-size=10 #H2 内存数据库进行测试 #spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE #spring.datasource.username=sa #spring.datasource.password= #spring.datasource.driver-class-name=org.h2.Driver # #spring.jpa.database-platform=org.hibernate.dialect.H2Dialect ########################################################################### ### JPA配置 ########################################################################### # 指定数据库类型 spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration globalVersion = 4.1.515 #spring.jpa.database=sql_server #spring.jpa.properties.hibernate.format_sql=true #### 指定命名策略 ##spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy ############################################################################# ### 字符集设置 ############################################################################# #server.servlet.encoding.force=true #server.servlet.encoding.charset=UTF-8 #server.servlet.encoding.enabled=true #server.tomcat.uri-encoding=UTF-8 ############################################################################## ### 热部署配置 ############################################################################## #spring.devtools.restart.enabled=true