Skip to content

Commit

Permalink
1.修复javassist在Springboot打包JAR下找不到类的BUG
Browse files Browse the repository at this point in the history
2.修复验证码响应类型
  • Loading branch information
Yiuman committed Nov 13, 2020
1 parent 89ea3a3 commit 017dec3
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<dependency>
<groupId>com.github.yiuman</groupId>
<artifactId>citrus-boot-starter</artifactId>
<version>0.0.6</version>
<version>0.0.7</version>
</dependency>
```

Expand Down
5 changes: 4 additions & 1 deletion citrus-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>citrus</artifactId>
<groupId>com.github.yiuman</groupId>
<version>0.0.6</version>
<version>0.0.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -17,18 +17,21 @@
<groupId>com.github.yiuman</groupId>
<artifactId>citrus-support</artifactId>
<version>${citrus.security.version}</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.github.yiuman</groupId>
<artifactId>citrus-security</artifactId>
<version>${citrus.security.version}</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.github.yiuman</groupId>
<artifactId>citrus-system</artifactId>
<version>${citrus.security.version}</version>
<scope>compile</scope>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion citrus-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dependency>
<groupId>com.github.yiuman</groupId>
<artifactId>citrus-boot-starter</artifactId>
<version>0.0.6</version>
<version>0.0.7</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion citrus-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.github.yiuman</groupId>
<artifactId>citrus</artifactId>
<version>0.0.6</version>
<version>0.0.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.github.yiuman.citrus.security.verify.AbstractStringVerificationProcessor;
import com.github.yiuman.citrus.security.verify.VerificationRepository;
import com.github.yiuman.citrus.security.verify.VerifyProperties;
import org.springframework.http.MediaType;

import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
Expand All @@ -29,7 +30,8 @@ public Captcha generate(HttpServletRequest httpServletRequest) {
@Override
public void send(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException {
Captcha captcha = generate(httpServletRequest);
verificationRepository.save(httpServletRequest,httpServletResponse, captcha);
verificationRepository.save(httpServletRequest, httpServletResponse, captcha);
httpServletResponse.setContentType(MediaType.IMAGE_JPEG_VALUE);
ImageIO.write(captcha.getImage(), "JPEG", httpServletResponse.getOutputStream());
}
}
2 changes: 1 addition & 1 deletion citrus-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>citrus</artifactId>
<groupId>com.github.yiuman</groupId>
<version>0.0.6</version>
<version>0.0.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import javassist.ClassPool;
import javassist.CtClass;
import javassist.LoaderClassPath;

import java.util.StringTokenizer;

Expand Down Expand Up @@ -37,6 +38,8 @@ public static void addClassPath(String path) throws Exception {
}

static {
//添加当前线程的ClassPath
POOL.appendClassPath(new LoaderClassPath(Thread.currentThread().getContextClassLoader()));
StringTokenizer token = new StringTokenizer(System.getProperty("java.class.path"), System.getProperty("path.separator"));

while (token.hasMoreElements()) {
Expand All @@ -47,5 +50,6 @@ public static void addClassPath(String path) throws Exception {
}
}


}
}
2 changes: 1 addition & 1 deletion citrus-system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>citrus</artifactId>
<groupId>com.github.yiuman</groupId>
<version>0.0.6</version>
<version>0.0.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
16 changes: 14 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.github.yiuman</groupId>
<artifactId>citrus</artifactId>
<version>0.0.6</version>
<version>0.0.7</version>
<name>citrus</name>
<description>springboot-开发脚手架</description>
<url>https://github.com/Yiuman/citrus</url>
Expand Down Expand Up @@ -45,13 +45,14 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.jdk>${java.version}</project.build.jdk>
<spring-boot.version>2.3.2.RELEASE</spring-boot.version>
<guava.version>28.2-jre</guava.version>
<mybatis.plus.version>3.3.1</mybatis.plus.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
<citrus.security.version>0.0.6</citrus.security.version>
<citrus.security.version>0.0.7</citrus.security.version>
<alibaba.easyexcel.version>2.1.6</alibaba.easyexcel.version>
<jjwt.version>0.11.0</jjwt.version>
<commons.io.version>2.6</commons.io.version>
Expand Down Expand Up @@ -117,6 +118,17 @@
</execution>
</executions>
</plugin>
<!-- compile-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${project.build.jdk}</source>
<target>${project.build.jdk}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>

<!-- Javadoc -->
<plugin>
Expand Down

0 comments on commit 017dec3

Please sign in to comment.