feat(商城): 代码优化

master
wayn 3 years ago
parent 8539808347
commit 004fc21233

@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.8</version>
<version>2.5.9</version>
</parent>
<modules>
<module>waynboot-common</module>
@ -37,10 +37,9 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<spring-boot.version>2.5.8</spring-boot.version>
<mysql.connector.java.version>8.0.27</mysql.connector.java.version>
<lettuce.version>6.1.6.RELEASE</lettuce.version>
<elasticsearch.version>7.14.0</elasticsearch.version>
<spring-boot.version>2.5.9</spring-boot.version>
<mysql.connector.java.version>8.0.25</mysql.connector.java.version>
<elasticsearch.version>7.13.4</elasticsearch.version>
<mybatis-plus.version>3.5.0</mybatis-plus.version>
<druid.version>1.2.8</druid.version>
<commons.io.version>2.11.0</commons.io.version>
@ -49,12 +48,12 @@
<commons-lang3.version>3.12.0</commons-lang3.version>
<fastjson.version>1.2.79</fastjson.version>
<easy-captcha.version>1.6.2</easy-captcha.version>
<swagger.version>3.0.0</swagger.version>
<knife4j.version>3.0.3</knife4j.version>
<easypoi.version>4.4.0</easypoi.version>
<jwt.version>3.18.3</jwt.version>
<qiniu.version>7.9.1</qiniu.version>
<mail.version>1.4.7</mail.version>
<spring-boot-admin.version>2.5.4</spring-boot-admin.version>
<spring-boot-admin.version>2.6.2</spring-boot-admin.version>
</properties>
<dependencies>
@ -79,8 +78,8 @@
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.lettuce/lettuce-core -->
@ -137,7 +136,6 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<optional>true</optional>
</dependency>
@ -215,9 +213,10 @@
<!--springfox swagger官方Starter-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${swagger.version}</version>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库搜索3.X最新版本号-->
<version>${knife4j.version}</version>
</dependency>
<dependency>

@ -70,6 +70,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/captcha/**").anonymous()
.antMatchers("/upload/**").anonymous()
.antMatchers("/common/download**").anonymous()
.antMatchers("/doc.html").anonymous()
.antMatchers("/swagger-ui/**").anonymous()
.antMatchers("/swagger-resources/**").anonymous()
.antMatchers("/webjars/**").anonymous()

@ -11,8 +11,10 @@ import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
/**

@ -13,7 +13,6 @@ import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import java.util.Objects;
@ -28,9 +27,6 @@ public class UserDetailsServiceImpl implements UserDetailsService {
@Autowired
private IDeptService iDeptService;
@Autowired
private PasswordEncoder passwordEncoder;
@Autowired
private SysPermissionService permissionService;

@ -25,8 +25,8 @@
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>${spring-boot.version}</version>
</dependency>
@ -179,8 +179,8 @@
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
</dependency>
</dependencies>

@ -12,8 +12,8 @@
<artifactId>waynboot-data-redis</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>${spring-boot.version}</version>
</dependency>

@ -39,8 +39,8 @@
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>${spring-boot.version}</version>
</dependency>

@ -25,8 +25,7 @@ spring:
listener:
simple:
acknowledge-mode: manual
direct:
acknowledge-mode: manual
prefetch: 100
boot:
admin:
client:

@ -19,7 +19,7 @@ import com.wayn.mobile.framework.manager.thread.AsyncManager;
import com.wayn.mobile.framework.security.util.MobileSecurityUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.core.TimeValue;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.MatchPhraseQueryBuilder;
import org.elasticsearch.index.query.MatchQueryBuilder;

@ -67,6 +67,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/home/**", "/category/**", "/comment/**", "/goods/detail/**", "/cart/goodsCount", "/diamond/**").permitAll()
.antMatchers("/upload/**").anonymous()
.antMatchers("/common/download**").anonymous()
.antMatchers("/doc.html").anonymous()
.antMatchers("/swagger-ui/**").anonymous()
.antMatchers("/swagger-resources/**").anonymous()
.antMatchers("/webjars/**").anonymous()

@ -11,8 +11,10 @@ import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
/**

Loading…
Cancel
Save