publish 0.0.13
This commit is contained in:
20
pom.xml
20
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>tiesheng</name>
|
<name>tiesheng</name>
|
||||||
<description>杭州铁晟科技有限公司基础依赖</description>
|
<description>杭州铁晟科技有限公司基础依赖</description>
|
||||||
@@ -57,55 +57,55 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-db-migration</artifactId>
|
<artifactId>tiesheng-db-migration</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-login</artifactId>
|
<artifactId>tiesheng-login</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-web</artifactId>
|
<artifactId>tiesheng-web</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-util</artifactId>
|
<artifactId>tiesheng-util</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-platform</artifactId>
|
<artifactId>tiesheng-platform</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-message</artifactId>
|
<artifactId>tiesheng-message</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-encrypt</artifactId>
|
<artifactId>tiesheng-encrypt</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-annotation</artifactId>
|
<artifactId>tiesheng-annotation</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-poi</artifactId>
|
<artifactId>tiesheng-poi</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-ademo</artifactId>
|
<artifactId>tiesheng-ademo</artifactId>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.tiesheng.demo;
|
|||||||
|
|
||||||
|
|
||||||
import com.tiesheng.core.EnableTieshengWeb;
|
import com.tiesheng.core.EnableTieshengWeb;
|
||||||
|
import com.tiesheng.demo.config.DemoWebConfigurer;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
@@ -11,7 +12,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|||||||
*/
|
*/
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableTieshengWeb
|
@EnableTieshengWeb(webConfigurer = DemoWebConfigurer.class)
|
||||||
public class DemoApplication {
|
public class DemoApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-annotation</artifactId>
|
<artifactId>tiesheng-annotation</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-db-migration</artifactId>
|
<artifactId>tiesheng-db-migration</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-encrypt</artifactId>
|
<artifactId>tiesheng-encrypt</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-login</artifactId>
|
<artifactId>tiesheng-login</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-message</artifactId>
|
<artifactId>tiesheng-message</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-platform</artifactId>
|
<artifactId>tiesheng-platform</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-poi</artifactId>
|
<artifactId>tiesheng-poi</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-util</artifactId>
|
<artifactId>tiesheng-util</artifactId>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.tiesheng</groupId>
|
<groupId>com.tiesheng</groupId>
|
||||||
<artifactId>tiesheng-parent</artifactId>
|
<artifactId>tiesheng-parent</artifactId>
|
||||||
<version>0.0.12</version>
|
<version>0.0.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>tiesheng-web</artifactId>
|
<artifactId>tiesheng-web</artifactId>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.tiesheng.core;
|
package com.tiesheng.core;
|
||||||
|
|
||||||
|
import com.tiesheng.core.service.TieshengWebConfigurer;
|
||||||
import com.tiesheng.login.LoginAutoConfigurer;
|
import com.tiesheng.login.LoginAutoConfigurer;
|
||||||
import com.tiesheng.message.MessageAutoConfigurer;
|
import com.tiesheng.message.MessageAutoConfigurer;
|
||||||
import com.tiesheng.migration.MigrationAutoConfigurer;
|
import com.tiesheng.migration.MigrationAutoConfigurer;
|
||||||
@@ -22,4 +23,7 @@ import java.lang.annotation.*;
|
|||||||
MigrationAutoConfigurer.class
|
MigrationAutoConfigurer.class
|
||||||
})
|
})
|
||||||
public @interface EnableTieshengWeb {
|
public @interface EnableTieshengWeb {
|
||||||
|
|
||||||
|
Class<? extends TieshengWebConfigurer> webConfigurer();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import cn.hutool.log.LogFactory;
|
|||||||
import com.tiesheng.core.pojos.CurrentWebUser;
|
import com.tiesheng.core.pojos.CurrentWebUser;
|
||||||
import com.tiesheng.core.pojos.dao.CorePlatformUnique;
|
import com.tiesheng.core.pojos.dao.CorePlatformUnique;
|
||||||
import com.tiesheng.login.config.token.bean.TokenBean;
|
import com.tiesheng.login.config.token.bean.TokenBean;
|
||||||
import com.tiesheng.util.exception.ApiException;
|
|
||||||
import com.tiesheng.util.exception.ApiRespEnum;
|
import com.tiesheng.util.exception.ApiRespEnum;
|
||||||
import com.tiesheng.util.pojos.ApiResp;
|
import com.tiesheng.util.pojos.ApiResp;
|
||||||
|
|
||||||
@@ -51,19 +50,7 @@ public interface TieshengWebConfigurer {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
default LoginConfigurer loginConfigurer() {
|
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");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
interface LoginConfigurer {
|
interface LoginConfigurer {
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user