[go: nahoru, domu]

Skip to content

Commit

Permalink
Solon 框架升为:2.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
noear committed Sep 4, 2023
1 parent fcf3cc4 commit e761698
Show file tree
Hide file tree
Showing 7 changed files with 405 additions and 52 deletions.
4 changes: 2 additions & 2 deletions sa-token-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<servlet-api.version>3.1.0</servlet-api.version>
<jakarta-servlet-api.version>6.0.0</jakarta-servlet-api.version>
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
<solon.version>2.4.0</solon.version>
<solon.version>2.5.3</solon.version>
<noear-redisx.version>1.4.8</noear-redisx.version>
<noear-snack3.version>3.2.72</noear-snack3.version>
<noear-snack3.version>3.2.79</noear-snack3.version>
<jfinal.version>4.9.17</jfinal.version>
<jboot.version>3.14.4</jboot.version>
<commons-pool2.version>2.5.0</commons-pool2.version>
Expand Down
25 changes: 23 additions & 2 deletions sa-token-starter/sa-token-solon-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,36 @@
<optional>true</optional>
</dependency>

<!-- redisx + snack3 -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
<artifactId>redisx</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.noear</groupId>
<artifactId>redisx</artifactId>
<artifactId>snack3</artifactId>
<scope>provided</scope>
</dependency>

<!-- redisson + jackson -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<scope>provided</scope>
</dependency>

<!-- jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<!-- jackson-datatype-jsr310 -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import cn.dev33.satoken.stp.StpUtil;
import cn.dev33.satoken.temp.SaTempInterface;
import org.noear.solon.Solon;
import org.noear.solon.core.AopContext;
import org.noear.solon.core.AppContext;
import org.noear.solon.core.Plugin;

/**
Expand All @@ -45,7 +45,7 @@
public class XPluginImp implements Plugin {

@Override
public void start(AopContext context) {
public void start(AppContext context) {
// Sa-Token 日志输出 Bean
context.getBeanAsync(SaLog.class, bean -> {
SaManager.setLog(bean);
Expand All @@ -60,7 +60,7 @@ public void start(AopContext context) {
});
}

private void beanInitDo(AopContext context) {
private void beanInitDo(AppContext context) {
// 注入上下文Bean
SaManager.setSaTokenContext(new SaContextForSolon());

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 2020-2099 sa-token.cc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.dev33.satoken.solon.dao;

import cn.dev33.satoken.session.SaSession;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
* Jackson定制版SaSession,忽略 timeout 等属性的序列化
*
* @author click33
* @since 1.34.0
*/
@JsonIgnoreProperties({"timeout"})
public class SaSessionForJacksonCustomized extends SaSession {

/**
*
*/
private static final long serialVersionUID = -7600983549653130681L;

public SaSessionForJacksonCustomized() {
super();
}

/**
* 构建一个Session对象
* @param id Session的id
*/
public SaSessionForJacksonCustomized(String id) {
super(id);
}

}
Loading

0 comments on commit e761698

Please sign in to comment.