首先要在web.xml中配置shiro的filter <filter> <filter-name>shiroFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter- ...
分类:
编程语言 时间:
2020-04-06 11:28:40
阅读次数:
72
接上篇:springboot使用PropertyResource注解读取指定配置文件的属性(传智播客代码)@ImportResource可以加载多个配置文件 DemoApplication.java package com.atguigu; import org.springframework.bo ...
分类:
编程语言 时间:
2020-04-05 22:13:05
阅读次数:
161
@EnableAutoConfiguration 这个注解的作用是: 从classpath中搜索所有META-INF/spring.factories配置文件然后,将其中org.springframework.boot.autoconfigure.EnableAutoConfiguration ke ...
分类:
其他好文 时间:
2020-04-05 18:43:07
阅读次数:
75
Eureka Client 配置项(eureka.client.*) org.springframework.cloud.netflix.eureka.EurekaClientConfigBean eureka.client.enabled用于指示Eureka客户端已启用的标志true eureka ...
分类:
编程语言 时间:
2020-04-05 18:21:18
阅读次数:
61
1. 前言 Spring 对 Feign 做了封装,包括常用的 encoder/decoder ,让我们能用 Bean 的形式使用 Feign。我们将沿用之前的代码。 1.1 Maven 依赖 1 <dependency> 2 <groupId>org.springframework.cloud</ ...
分类:
编程语言 时间:
2020-04-05 15:49:42
阅读次数:
96
## 1 通过Controller控制跳转 package com.syu.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.Req ...
分类:
编程语言 时间:
2020-04-05 13:21:15
阅读次数:
68
项目结构如下(Idea) 代码 package com.syu.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuratio ...
分类:
编程语言 时间:
2020-04-05 09:17:12
阅读次数:
99
package com.syu.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ViewCont ...
分类:
编程语言 时间:
2020-04-05 09:14:39
阅读次数:
98
问题 用过idea(笔者经常用2018.3.x)创建 spring boot项目的时候默认会创建一个以下骨架的测试代码 package com.atguigu; import org.junit.jupiter.api.Test; import org.springframework.boot.te ...
分类:
编程语言 时间:
2020-04-04 20:20:22
阅读次数:
587
需要被监控的微服务工程pom依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId></dependency>yml中 manag ...
分类:
其他好文 时间:
2020-04-04 20:19:37
阅读次数:
67