itcast: pic: width: 301 height: 400 server: port: 8881 |
[size=10.5000pt]<dependency[size=10.5000pt]> [size=10.5000pt] [size=10.5000pt] [size=10.5000pt] [size=10.5000pt]<groupId[size=10.5000pt]>org.springframework.boot</groupId[size=10.5000pt]> [size=10.5000pt] [size=10.5000pt] [size=10.5000pt] [size=10.5000pt]<artifactId[size=10.5000pt]>spring-boot-starter-freemarker</artifactId[size=10.5000pt]> </dependency[size=10.5000pt]> |
<!-- jsp解析器 --> [size=6.5000pt] [size=6.5000pt] [size=6.5000pt]<dependency[size=6.5000pt]> [size=6.5000pt] [size=6.5000pt] [size=6.5000pt] [size=6.5000pt]<groupId[size=6.5000pt]>org.apache.tomcat.embed</groupId[size=6.5000pt]> [size=6.5000pt] [size=6.5000pt] [size=6.5000pt] [size=6.5000pt]<artifactId[size=6.5000pt]>tomcat-embed-jasper</artifactId[size=6.5000pt]> [size=6.5000pt] [size=6.5000pt] [size=6.5000pt] [size=6.5000pt]<scope[size=6.5000pt]>provided</scope[size=6.5000pt]> [size=6.5000pt] [size=6.5000pt] </dependency[size=6.5000pt]> [size=6.5000pt] [size=6.5000pt] <!-- jstl --> [size=6.5000pt] [size=6.5000pt] [size=6.5000pt]<dependency[size=6.5000pt]> [size=6.5000pt] [size=6.5000pt] [size=6.5000pt] [size=6.5000pt]<groupId[size=6.5000pt]>javax.servlet</groupId[size=6.5000pt]> [size=6.5000pt] [size=6.5000pt] [size=6.5000pt] [size=6.5000pt]<artifactId[size=6.5000pt]>jstl</artifactId[size=6.5000pt]> [size=6.5000pt] [size=6.5000pt] </dependency[size=6.5000pt]> |
<!-- jsp解析器 --> [size=7.5000pt] [size=7.5000pt] [size=7.5000pt]<dependency[size=7.5000pt]> [size=7.5000pt] [size=7.5000pt] [size=7.5000pt] [size=7.5000pt]<groupId[size=7.5000pt]>org.apache.tomcat.embed</groupId[size=7.5000pt]> [size=7.5000pt] [size=7.5000pt] [size=7.5000pt] [size=7.5000pt]<artifactId[size=7.5000pt]>tomcat-embed-jasper</artifactId[size=7.5000pt]> [size=7.5000pt] [size=7.5000pt] [size=7.5000pt] [size=7.5000pt]<scope[size=7.5000pt]>provided</scope[size=7.5000pt]> [size=7.5000pt] [size=7.5000pt] </dependency[size=7.5000pt]> [size=7.5000pt] [size=7.5000pt] <!-- jstl --> [size=7.5000pt] [size=7.5000pt] [size=7.5000pt]<dependency[size=7.5000pt]> [size=7.5000pt] [size=7.5000pt] [size=7.5000pt] [size=7.5000pt]<groupId[size=7.5000pt]>javax.servlet</groupId[size=7.5000pt]> [size=7.5000pt] [size=7.5000pt] [size=7.5000pt] [size=7.5000pt]<artifactId[size=7.5000pt]>jstl</artifactId[size=7.5000pt]> </dependency> |
spring.mvc.view.prefix=/WEB-INF/jsp spring.mvc.view.suffix=.jsp |
spring.datasource.driver=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/taotao?characterEncoding=utf-8 spring.datasource.username=root spring.datasource.password=root #指定mybatis xml文件位置 mybatis.mapper-locations=classpath*:/mapperXml/*Mapper.xml |
[size=12.0000pt]<dependency[size=12.0000pt]> [size=12.0000pt] [size=12.0000pt] [size=12.0000pt] [size=12.0000pt]<groupId[size=12.0000pt]>org.springframework.boot</groupId[size=12.0000pt]> [size=12.0000pt] [size=12.0000pt] [size=12.0000pt] [size=12.0000pt]<artifactId[size=12.0000pt]>spring-boot-starter-data-redis</artifactId[size=12.0000pt]> </dependency[size=12.0000pt]> |
################redis 集群版######################### spring.redis.cluster.nodes=192.168.25.129:7001,192.168.25.129:7002,192.168.25.129:7003,192.168.25.129:7004,192.168.25.129:7005,192.168.25.129:7006 #################################################### ##################redis单机版##################### #spring.redis.host=211.159.182.188 #spring.redis.port=6379 #spring.redis.database=0 |
@Autowired [size=14.0000pt] private StringRedisTemplate redisTemplate[size=14.0000pt]; |
spring.cache.type=redis |
@Cacheable(value="stus",key="#name") 生成的key为 stus:name变量的值 |
@CacheEvict(value={"stus"},allEntries=true) |
[size=12.0000pt]<dependency[size=12.0000pt]> [size=12.0000pt] [size=12.0000pt] [size=12.0000pt] [size=12.0000pt]<groupId[size=12.0000pt]>org.springframework.boot</groupId[size=12.0000pt]> [size=12.0000pt] [size=12.0000pt] [size=12.0000pt] [size=12.0000pt]<artifactId[size=12.0000pt]>spring-boot-starter-activemq</artifactId[size=12.0000pt]> [size=12.0000pt] [size=12.0000pt] </dependency[size=12.0000pt]> |
spring.activemq.broker-url=tcp://192.168.25.134:61616 spring.activemq.user[size=10.5000pt]=zhu spring.activemq.password=zhu.123 我的mq设置了密码 如果你的没设置可以不指定 |
@WebServlet("/pic") //定义servlet组件 @ServletComponentScan("com") //扫描servlet组件 |
[size=9.0000pt]<dependency[size=9.0000pt]> [size=9.0000pt] [size=9.0000pt] [size=9.0000pt] [size=9.0000pt]<groupId[size=9.0000pt]>com.alibaba</groupId[size=9.0000pt]> [size=9.0000pt] [size=9.0000pt] [size=9.0000pt] [size=9.0000pt]<artifactId[size=9.0000pt]>druid</artifactId[size=9.0000pt]> [size=9.0000pt] [size=9.0000pt] [size=9.0000pt] [size=9.0000pt]<version[size=9.0000pt]>1.1.2</version[size=9.0000pt]> </dependency[size=9.0000pt]> |
spring.datasource.driver=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/taotao?characterEncoding=utf-8 spring.datasource.username=root spring.datasource.password=root #配置数据库连接池类型 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |