mirror of
				https://github.com/YunaiV/ruoyi-vue-pro.git
				synced 2025-10-31 10:37:41 +08:00 
			
		
		
		
	1. 增加 druid
2. 增加 skywalking
This commit is contained in:
		| @ -35,23 +35,3 @@ spring: | |||||||
|             testWhileIdle: true |             testWhileIdle: true | ||||||
|             testOnBorrow: false |             testOnBorrow: false | ||||||
|             testOnReturn: false |             testOnReturn: false | ||||||
|             webStatFilter:  |  | ||||||
|                 enabled: true |  | ||||||
|             statViewServlet: |  | ||||||
|                 enabled: true |  | ||||||
|                 # 设置白名单,不填则允许所有访问 |  | ||||||
|                 allow: |  | ||||||
|                 url-pattern: /druid/* |  | ||||||
|                 # 控制台管理用户名和密码 |  | ||||||
|                 login-username:  |  | ||||||
|                 login-password:  |  | ||||||
|             filter: |  | ||||||
|                 stat: |  | ||||||
|                     enabled: true |  | ||||||
|                     # 慢SQL记录 |  | ||||||
|                     log-slow-sql: true |  | ||||||
|                     slow-sql-millis: 1000 |  | ||||||
|                     merge-sql: true |  | ||||||
|                 wall: |  | ||||||
|                     config: |  | ||||||
|                         multi-statement-allow: true |  | ||||||
| @ -9,7 +9,7 @@ export default { | |||||||
|   name: 'YudaoGit', |   name: 'YudaoGit', | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       url: 'https://github.com/YunaiV/ruoyi-vue-proe' |       url: 'https://github.com/YunaiV/ruoyi-vue-pro' | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|  | |||||||
| @ -18,7 +18,7 @@ export default { | |||||||
|  |  | ||||||
|     setTimeout(() => { |     setTimeout(() => { | ||||||
|       // 模拟点击【应用】菜单 |       // 模拟点击【应用】菜单 | ||||||
|       that.$refs["iframe"].contentWindow.document.getElementsByClassName('navbar-item')[2].click(); |       // that.$refs["iframe"].contentWindow.document.getElementsByClassName('navbar-item')[2].click(); // TODO 暂时去掉,存在跨域问题 | ||||||
|       // 取消加载中 |       // 取消加载中 | ||||||
|       this.loading = false; |       this.loading = false; | ||||||
|     }, 230); |     }, 230); | ||||||
|  | |||||||
							
								
								
									
										26
									
								
								ruoyi-ui/src/views/infra/skywalking/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								ruoyi-ui/src/views/infra/skywalking/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | |||||||
|  | <template> | ||||||
|  |   <div v-loading="loading" :style="'height:'+ height"> | ||||||
|  |     <iframe :src="src" frameborder="no" style="width: 100%;height: 100%" scrolling="auto" /> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | <script> | ||||||
|  | export default { | ||||||
|  |   name: "SkyWalking", | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       src: "http://skywalking.shop.iocoder.cn", // TODO 芋艿,后续改成配置读取 | ||||||
|  |       height: document.documentElement.clientHeight - 94.5 + "px;", | ||||||
|  |       loading: true | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   mounted: function() { | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.loading = false; | ||||||
|  |     }, 230); | ||||||
|  |     const that = this; | ||||||
|  |     window.onresize = function temp() { | ||||||
|  |       that.height = document.documentElement.clientHeight - 94.5 + "px;"; | ||||||
|  |     }; | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
| @ -123,32 +123,31 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { | |||||||
|                 // 一堆自定义的 Spring Security 处理器 |                 // 一堆自定义的 Spring Security 处理器 | ||||||
|                 .exceptionHandling().authenticationEntryPoint(unauthorizedHandler) |                 .exceptionHandling().authenticationEntryPoint(unauthorizedHandler) | ||||||
|                     .accessDeniedHandler(accessDeniedHandler).and() |                     .accessDeniedHandler(accessDeniedHandler).and() | ||||||
|                 // TODO 过滤请求 |                 // 设置每个请求的权限 | ||||||
|                 .authorizeRequests() |                 .authorizeRequests() | ||||||
|                 // 登陆的接口,可匿名访问 |                     // 登陆的接口,可匿名访问 | ||||||
|                 .antMatchers(webProperties.getApiPrefix() + "/login").anonymous() |                     .antMatchers(webProperties.getApiPrefix() + "/login").anonymous() | ||||||
|                 // 通用的接口,可匿名访问 |                     // 通用的接口,可匿名访问 | ||||||
|                 .antMatchers( webProperties.getApiPrefix() + "/system/captcha/**").anonymous() |                     .antMatchers( webProperties.getApiPrefix() + "/system/captcha/**").anonymous() | ||||||
|                 // TODO |                     // 静态资源,可匿名访问 | ||||||
|                 .antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll() |                     .antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll() | ||||||
|                 .antMatchers("/profile/**").anonymous() |                     // 文件的获取接口,可匿名访问 | ||||||
|                 // 文件的获取接口,可匿名访问 |                     .antMatchers(webProperties.getApiPrefix() + "/system/file/get/**").anonymous() | ||||||
|                 .antMatchers(webProperties.getApiPrefix() + "/system/file/get/**").anonymous() |                     // Swagger 接口文档 | ||||||
|                 // TODO |                     .antMatchers("/swagger-ui.html").anonymous() | ||||||
|                 .antMatchers("/swagger-ui.html").anonymous() |                     .antMatchers("/swagger-resources/**").anonymous() | ||||||
|                 .antMatchers("/swagger-resources/**").anonymous() |                     .antMatchers("/webjars/**").anonymous() | ||||||
|                 .antMatchers("/webjars/**").anonymous() |                     .antMatchers("/*/api-docs").anonymous() | ||||||
|                 .antMatchers("/*/api-docs").anonymous() |                     // Spring Boot Admin Server 的安全配置 | ||||||
|                 // Spring Boot Admin Server 的安全配置 |                     .antMatchers(adminServerProperties.getContextPath()).anonymous() | ||||||
|                 .antMatchers(adminServerProperties.getContextPath()).anonymous() |                     .antMatchers(adminServerProperties.getContextPath() + "/**").anonymous() | ||||||
|                 .antMatchers(adminServerProperties.getContextPath() + "/**").anonymous() |                     // Spring Boot Actuator 的安全配置 | ||||||
|                 // Spring Boot Actuator 的安全配置 |                     .antMatchers("/actuator").anonymous() | ||||||
|                 .antMatchers("/actuator").anonymous() |                     .antMatchers("/actuator/**").anonymous() | ||||||
|                 .antMatchers("/actuator/**").anonymous() |                     // Druid 监控 | ||||||
|                 // TODO |                     .antMatchers("/druid/**").anonymous() | ||||||
|                 .antMatchers("/druid/**").hasAnyAuthority("druid") // TODO 芋艿,未来需要在拓展下 |                     // 除上面外的所有请求全部需要鉴权认证 | ||||||
|                 // 除上面外的所有请求全部需要鉴权认证 |                     .anyRequest().authenticated() | ||||||
|                 .anyRequest().authenticated() |  | ||||||
|                 .and() |                 .and() | ||||||
|                 .headers().frameOptions().disable(); |                 .headers().frameOptions().disable(); | ||||||
|         httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); |         httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); | ||||||
|  | |||||||
| @ -11,6 +11,27 @@ spring: | |||||||
|     driver-class-name: com.mysql.jdbc.Driver |     driver-class-name: com.mysql.jdbc.Driver | ||||||
|     username: root |     username: root | ||||||
|     password: 123456 |     password: 123456 | ||||||
|  |     druid: | ||||||
|  |       web-stat-filter: | ||||||
|  |         enabled: true | ||||||
|  |       stat-view-servlet: | ||||||
|  |         enabled: true | ||||||
|  |         # 设置白名单,不填则允许所有访问 | ||||||
|  |         allow: | ||||||
|  |         url-pattern: /druid/* | ||||||
|  |         # 控制台管理用户名和密码 | ||||||
|  |         login-username: | ||||||
|  |         login-password: | ||||||
|  |       filter: | ||||||
|  |         stat: | ||||||
|  |           enabled: true | ||||||
|  |           # 慢 SQL 记录 | ||||||
|  |           log-slow-sql: true | ||||||
|  |           slow-sql-millis: 100 | ||||||
|  |           merge-sql: true | ||||||
|  |         wall: | ||||||
|  |           config: | ||||||
|  |             multi-statement-allow: true | ||||||
|  |  | ||||||
|   # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 |   # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 | ||||||
|   redis: |   redis: | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV