Pre Merge pull request !1 from Quieter/master

pull/1/MERGE
Quieter 5 years ago committed by Gitee
commit d2701c9214

2
.gitignore vendored

@ -41,3 +41,5 @@ nbdist/
!*/build/*.java !*/build/*.java
!*/build/*.html !*/build/*.html
!*/build/*.xml !*/build/*.xml
/**/src/main/resources/.triggerFile
/**/**/src/main/resources/.triggerFile

@ -203,6 +203,20 @@
<version>${ruoyi.version}</version> <version>${ruoyi.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.14</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

@ -23,6 +23,11 @@
<artifactId>ruoyi-common-core</artifactId> <artifactId>ruoyi-common-core</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -58,6 +58,17 @@
<artifactId>ruoyi-common-redis</artifactId> <artifactId>ruoyi-common-redis</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -50,6 +50,8 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter
@Override @Override
protected void configure(HttpSecurity http) throws Exception protected void configure(HttpSecurity http) throws Exception
{ {
http.httpBasic().disable();
http http
.authorizeRequests() .authorizeRequests()
.antMatchers( .antMatchers(
@ -57,6 +59,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter
"/token/**").permitAll() "/token/**").permitAll()
.anyRequest().authenticated() .anyRequest().authenticated()
.and().csrf().disable(); .and().csrf().disable();
} }
/*** 设置不拦截规则 */ /*** 设置不拦截规则 */

@ -17,7 +17,7 @@ import com.ruoyi.common.security.handler.AbstractAuthenticationFailureEvenHandle
@Component @Component
public class AuthenticationFailureEvenHandler extends AbstractAuthenticationFailureEvenHandler public class AuthenticationFailureEvenHandler extends AbstractAuthenticationFailureEvenHandler
{ {
private final Logger logger = LoggerFactory.getLogger(AuthenticationSuccessEventHandler.class); private final Logger logger = LoggerFactory.getLogger(AuthenticationFailureEvenHandler.class);
@Override @Override
public void handle(AuthenticationException authenticationException, Authentication authentication) public void handle(AuthenticationException authenticationException, Authentication authentication)

@ -17,8 +17,7 @@ public class RyResourceServerConfigurerAdapter extends ResourceServerConfigurerA
@Autowired @Autowired
protected ResourceAuthExceptionEntryPoint resourceAuthExceptionEntryPoint; protected ResourceAuthExceptionEntryPoint resourceAuthExceptionEntryPoint;
@Autowired protected RemoteTokenServices remoteTokenServices = new RemoteTokenServices();
protected RemoteTokenServices remoteTokenServices;
@Autowired @Autowired
private AccessDeniedHandler accessDeniedHandler; private AccessDeniedHandler accessDeniedHandler;

@ -40,6 +40,11 @@
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!--验证码 --> <!--验证码 -->
<dependency> <dependency>
<groupId>com.github.penggle</groupId> <groupId>com.github.penggle</groupId>
@ -64,6 +69,18 @@
<version>${swagger.fox.version}</version> <version>${swagger.fox.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -22,3 +22,12 @@ spring:
file-extension: yml file-extension: yml
# 共享配置 # 共享配置
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
gateway:
routes:
- id: authRoute
uri: lb://ruoyi-auth
order: 10000
predicates:
- Path=/auth/**
filters:
- StripPrefix=1

@ -84,5 +84,16 @@
<artifactId>ruoyi-common-swagger</artifactId> <artifactId>ruoyi-common-swagger</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -1,11 +1,13 @@
package com.ruoyi.job; package com.ruoyi.job;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication; import org.springframework.cloud.client.SpringCloudApplication;
import com.ruoyi.common.security.annotation.EnableCustomConfig; import com.ruoyi.common.security.annotation.EnableCustomConfig;
import com.ruoyi.common.security.annotation.EnableRyFeignClients; import com.ruoyi.common.security.annotation.EnableRyFeignClients;
import com.ruoyi.common.security.annotation.EnableRyResourceServer; import com.ruoyi.common.security.annotation.EnableRyResourceServer;
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2; import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/** /**
* *
@ -17,6 +19,7 @@ import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
@EnableRyFeignClients @EnableRyFeignClients
@EnableRyResourceServer @EnableRyResourceServer
@SpringCloudApplication @SpringCloudApplication
@EnableDiscoveryClient
public class RuoYiJobApplication public class RuoYiJobApplication
{ {
public static void main(String[] args) public static void main(String[] args)

@ -22,3 +22,7 @@ spring:
file-extension: yml file-extension: yml
# 共享配置 # 共享配置
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
mybatis:
mapper-locations: classpath*:/**/*Mapper.xml
type-aliases-package: com.ruoyi.job.domain

@ -78,5 +78,11 @@
<artifactId>ruoyi-common-swagger</artifactId> <artifactId>ruoyi-common-swagger</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -1,6 +1,6 @@
# Tomcat # Tomcat
server: server:
port: 9201 port: 80
# Spring # Spring
spring: spring:

@ -36,7 +36,7 @@ module.exports = {
target: `http://localhost:8080`, target: `http://localhost:8080`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: '/'
} }
} }
}, },

Loading…
Cancel
Save