Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions autoload-cache-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
<description>autoload-cache spring boot starter.</description>
<properties>
<skip_maven_deploy>false</skip_maven_deploy>
<spring-boot.version>3.5.3</spring-boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -135,7 +136,7 @@
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.0</version>
<version>3.0.5</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
Expand Down Expand Up @@ -178,6 +179,20 @@
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import java.io.IOException;
import java.util.Base64;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.FilterConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.springframework.http.HttpStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;

import org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.jarvis.cache.autoconfigure;

import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
com.jarvis.cache.autoconfigure.AutoloadCacheManageConfiguration
com.jarvis.cache.autoconfigure.DistributedLockConfiguration
com.jarvis.cache.autoconfigure.AutoloadCacheAutoConfigure
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void onApplicationEvent(ApplicationReadyEvent event) {
userMapper.allUsers();

UserCondition condition = new UserCondition();
PageRequest page =new PageRequest(1, 10);
PageRequest page = PageRequest.of(1, 10);
condition.setPageable(page);
condition.setStatus(1);
userMapper.listByCondition(condition);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void test1Add() throws Exception {
userService.doLogin("tmp2", "aaaa3");

UserCondition condition = new UserCondition();
Pageable pageable = new PageRequest(0, 10);
Pageable pageable = PageRequest.of(0, 10);
condition.setPageable(pageable);

List<UserDO> list = userService.listByCondition(condition);
Expand Down Expand Up @@ -84,7 +84,7 @@ public void testMagic() throws Exception {
userService.getUserById(1L);

UserCondition condition = new UserCondition();
Pageable pageable = new PageRequest(0, 5);
Pageable pageable = PageRequest.of(0, 5);
condition.setPageable(pageable);

List<UserDO> list = userService.listByCondition(condition);
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
create table if not exists user(id int not null primary key auto_increment, name varchar(100), password varchar(10), status int);
create table if not exists `user`(id int not null primary key auto_increment,
name varchar(100),
password varchar(10),
status int);
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
<select id="getUserById" parameterType="java.lang.Long" resultMap="UserResultMap">
select
<include refid="columns" />
from user
from `user`
where id = #{id}
</select>

<select id="allUsers" resultMap="UserResultMap">
select
<include refid="columns" />
from user
from `user`
</select>

<select id="listByCondition" parameterType="com.jarvis.cache.demo.condition.UserCondition" resultMap="UserResultMap">
select
<include refid="columns" />
from user
from `user`
<where>
<if test="id != null"> and id = #{id}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%') </if>
Expand All @@ -41,12 +41,12 @@
</select>

<select id="getUserIdByName" parameterType="java.lang.String" resultType="java.lang.Long">
select id from user
select id from `user`
where name = #{name}
</select>

<select id="listIdsByCondition" parameterType="com.jarvis.cache.demo.condition.UserCondition" resultType="java.lang.Long">
select id from user
select id from `user`
<where>
<if test="id != null"> and id = #{id}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%') </if>
Expand All @@ -60,7 +60,7 @@
<select id="listByIds" resultMap="UserResultMap">
select
<include refid="columns" />
from user
from `user`
where
<foreach collection="ids" item="id" separator=" or ">
id = #{id}
Expand All @@ -70,20 +70,20 @@
<select id="listByIds2" resultMap="UserResultMap">
select
<include refid="columns" />
from user
from `user`
where
<foreach collection="ids" item="id" separator=" or ">
id = #{id}
</foreach>
</select>

<insert id="addUser" parameterType="com.jarvis.cache.demo.entity.UserDO" useGeneratedKeys="true" keyProperty="id">
insert into user(name, password, status)
insert into `user`(name, password, status)
values(#{name}, #{password}, 1)
</insert>

<update id="updateUser" parameterType="com.jarvis.cache.demo.entity.UserDO">
update user
update `user`
<set>
<if test="password != null and password != ''"> password = #{password}, </if>
<if test="status != null"> status = #{status},</if>
Expand All @@ -92,11 +92,11 @@
</update>

<update id="deleteUserById" parameterType="java.lang.Long">
update user set status = 0 where id = #{id}
update `user` set status = 0 where id = #{id}
</update>

<update id="deleteUserByIds">
update user set status = 0 where
update `user` set status = 0 where
<foreach collection="ids" item="id" separator=" or ">
id = #{id}
</foreach>
Expand Down
46 changes: 24 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<description>Use AOP and Annotation manage cache.</description>
<url>https://github.com/qiujiayu/AutoLoadCache</url>
<properties>
<revision>7.2.1</revision>
<java_source_version>1.8</java_source_version>
<java_target_version>1.8</java_target_version>
<revision>8.0.0</revision>
<java_source_version>17</java_source_version>
<java_target_version>17</java_target_version>
<file_encoding>UTF-8</file_encoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>5.2.21.RELEASE</spring.version>
<maven_deploy_version>2.8.2</maven_deploy_version>
<maven_compiler_version>3.8.1</maven_compiler_version>
<spring-framework.version>6.2.8</spring-framework.version>
<maven_deploy_version>3.1.3</maven_deploy_version>
<maven_compiler_version>3.13.0</maven_compiler_version>
<skip_maven_deploy>false</skip_maven_deploy>
</properties>
<modules>
Expand Down Expand Up @@ -56,20 +56,27 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring-framework.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.23</version>
<version>2.0.17</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.21</version>
<version>1.26.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.4.2</version>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
Expand All @@ -79,17 +86,12 @@
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.10</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.version}</version>
<version>1.9.24</version>
</dependency>
<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
<version>5.3.1.RELEASE</version>
<version>6.6.0.RELEASE</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
Expand Down Expand Up @@ -119,7 +121,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.0-rc1</version>
<version>2.19.1</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
Expand Down Expand Up @@ -149,12 +151,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.10</version>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.16.3</version>
<version>3.24.3</version>
</dependency>
<dependency>
<groupId>com.googlecode.combinatoricslib</groupId>
Expand All @@ -164,7 +166,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -208,15 +210,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>3.8.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<source>8</source>
<source>17</source>
</configuration>
</execution>
</executions>
Expand Down