yml配置和Jar包管理

1. 配置YML源



配置spring

spring:
  application:
    name: item-service #项目名


配置Mybatis

配置数据源

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/库名?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true
    username: root
    password: root

项目忽略Mybatis源
@SpringBootApplication(exclude=DataSourceAutoConfiguration.class)



配置mybatis映射文件

mybatis:
  mapper-locations:
  - classpath:/mapper/*/*.xml

在这里插入图片描述



配置Mybatis Plus

#mybatis-plush配置
mybatis-plus:
  type-aliases-package: com.jt.pojo #映射对象
  mapper-locations: classpath:/mybatis/mappers/*.xml
  configuration:
    map-underscore-to-camel-case: true


配置MVC

spring:     #定义springmvc视图解析器
  mvc:
    view:
      prefix: /WEB-INF/views/
      suffix: .jsp


配置server

server:
  port: 8094 #端口信息
  servlet:
    context-path: /


配置tomcat

server:
  tomcat:
    max-threads: 256
    min-spare-threads: 5


配置日志

#log
logging:
  level:
   com.cy: debug


配置shrio

shiro:
  loginUrl: /doLoginUI
  web:
    enabled: true
  sessionManager:
    sessionIdCookieEnabled: true
    sessionIdUrlRewritingEnabled: false
  rememberMeManager: 
    cookie: 
      name: rememberMe 
      maxAge: 3600




2. jar包管理



1. properties

	<properties>
		<!--指定JDK版本 -->
		<java.version>1.8</java.version>
		<!--指定maven插件版本 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值