publish 0.0.13

This commit is contained in:
曾文豪
2023-01-10 14:30:21 +08:00
parent 6281cd3682
commit 22bd0b05df
16 changed files with 46 additions and 58 deletions

20
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
<packaging>pom</packaging>
<name>tiesheng</name>
<description>杭州铁晟科技有限公司基础依赖</description>
@@ -57,55 +57,55 @@
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-db-migration</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-login</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-web</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-util</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-platform</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-message</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-encrypt</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-annotation</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-poi</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</dependency>
<dependency>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-ademo</artifactId>

View File

@@ -2,6 +2,7 @@ package com.tiesheng.demo;
import com.tiesheng.core.EnableTieshengWeb;
import com.tiesheng.demo.config.DemoWebConfigurer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@@ -11,7 +12,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
*/
@EnableTransactionManagement
@SpringBootApplication
@EnableTieshengWeb
@EnableTieshengWeb(webConfigurer = DemoWebConfigurer.class)
public class DemoApplication {
public static void main(String[] args) {

View File

@@ -0,0 +1,19 @@
package com.tiesheng.demo.config;
import com.tiesheng.core.pojos.CurrentWebUser;
import com.tiesheng.core.service.TieshengWebConfigurer;
import org.springframework.stereotype.Component;
@Component
public class DemoWebConfigurer implements TieshengWebConfigurer {
@Override
public CurrentWebUser getCurrentUserName(String userId) {
return null;
}
@Override
public LoginConfigurer loginConfigurer() {
return null;
}
}

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-db-migration</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-encrypt</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-login</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-platform</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-poi</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-util</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng</groupId>
<artifactId>tiesheng-parent</artifactId>
<version>0.0.12</version>
<version>0.0.13</version>
</parent>
<artifactId>tiesheng-web</artifactId>

View File

@@ -1,5 +1,6 @@
package com.tiesheng.core;
import com.tiesheng.core.service.TieshengWebConfigurer;
import com.tiesheng.login.LoginAutoConfigurer;
import com.tiesheng.message.MessageAutoConfigurer;
import com.tiesheng.migration.MigrationAutoConfigurer;
@@ -22,4 +23,7 @@ import java.lang.annotation.*;
MigrationAutoConfigurer.class
})
public @interface EnableTieshengWeb {
Class<? extends TieshengWebConfigurer> webConfigurer();
}

View File

@@ -4,7 +4,6 @@ import cn.hutool.log.LogFactory;
import com.tiesheng.core.pojos.CurrentWebUser;
import com.tiesheng.core.pojos.dao.CorePlatformUnique;
import com.tiesheng.login.config.token.bean.TokenBean;
import com.tiesheng.util.exception.ApiException;
import com.tiesheng.util.exception.ApiRespEnum;
import com.tiesheng.util.pojos.ApiResp;
@@ -51,19 +50,7 @@ public interface TieshengWebConfigurer {
*
* @return
*/
default LoginConfigurer loginConfigurer() {
return new LoginConfigurer() {
@Override
public TokenBean doLogin(CorePlatformUnique platformUnique) {
throw new ApiException("请配置TieshengWebConfigurer->loginConfigurer");
}
@Override
public void redirect(TokenBean bean, String extra, HttpServletResponse response) {
throw new ApiException("请配置TieshengWebConfigurer->loginConfigurer");
}
};
}
LoginConfigurer loginConfigurer();
interface LoginConfigurer {

View File

@@ -1,23 +0,0 @@
package com.tiesheng.core.service.impl;
import com.tiesheng.core.pojos.CurrentWebUser;
import com.tiesheng.core.service.TieshengWebConfigurer;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Configuration;
/**
* @author hao
*/
@Configuration
@ConditionalOnMissingBean(value = TieshengWebConfigurer.class, ignored = DefaultWebConfigurer.class)
public class DefaultWebConfigurer implements TieshengWebConfigurer {
@Override
public CurrentWebUser getCurrentUserName(String userId) {
CurrentWebUser webUser = new CurrentWebUser();
webUser.setId(userId);
webUser.setName(webUser.getId());
return webUser;
}
}