Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
d8a7dc4a
Commit
d8a7dc4a
authored
Sep 11, 2019
by
zengchao
Browse files
-
parent
a817503b
Changes
9
Hide whitespace changes
Inline
Side-by-side
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/service/UserConsoleService.java
View file @
d8a7dc4a
...
@@ -4,7 +4,6 @@ import java.util.ArrayList;
...
@@ -4,7 +4,6 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.catalina.User
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.beetl.sql.core.engine.PageQuery
;
import
org.beetl.sql.core.engine.PageQuery
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -34,7 +33,7 @@ import com.ibeetl.admin.core.util.enums.GeneralStateEnum;
...
@@ -34,7 +33,7 @@ import com.ibeetl.admin.core.util.enums.GeneralStateEnum;
@Transactional
@Transactional
public
class
UserConsoleService
extends
CoreBaseService
<
CoreUser
>
{
public
class
UserConsoleService
extends
CoreBaseService
<
CoreUser
>
{
@Autowired
UserConsoleDao
userDao
;
@Autowired
UserConsoleDao
user
Console
Dao
;
@Autowired
FileService
fileService
;
@Autowired
FileService
fileService
;
...
@@ -48,7 +47,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -48,7 +47,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
* @param query
* @param query
*/
*/
public
void
queryByCondtion
(
PageQuery
<
CoreUser
>
query
)
{
public
void
queryByCondtion
(
PageQuery
<
CoreUser
>
query
)
{
PageQuery
<
CoreUser
>
ret
=
userDao
.
queryByCondtion
(
query
);
PageQuery
<
CoreUser
>
ret
=
user
Console
Dao
.
queryByCondtion
(
query
);
queryListAfter
(
ret
.
getList
());
queryListAfter
(
ret
.
getList
());
}
}
...
@@ -60,7 +59,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -60,7 +59,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
public
void
saveUser
(
CoreUser
user
)
{
public
void
saveUser
(
CoreUser
user
)
{
CoreUser
query
=
new
CoreUser
();
CoreUser
query
=
new
CoreUser
();
query
.
setCode
(
user
.
getCode
());
query
.
setCode
(
user
.
getCode
());
CoreUser
dbUser
=
userDao
.
templateOne
(
query
);
CoreUser
dbUser
=
user
Console
Dao
.
templateOne
(
query
);
if
(
dbUser
!=
null
)
{
if
(
dbUser
!=
null
)
{
throw
new
PlatformException
(
"保存用户信息失败,用户已经存在"
);
throw
new
PlatformException
(
"保存用户信息失败,用户已经存在"
);
}
}
...
@@ -68,11 +67,11 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -68,11 +67,11 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
user
.
setState
(
GeneralStateEnum
.
ENABLE
.
getValue
());
user
.
setState
(
GeneralStateEnum
.
ENABLE
.
getValue
());
user
.
setPassword
(
passwordEncryptService
.
password
(
user
.
getPassword
()));
user
.
setPassword
(
passwordEncryptService
.
password
(
user
.
getPassword
()));
user
.
setDelFlag
(
DelFlagEnum
.
NORMAL
.
getValue
());
user
.
setDelFlag
(
DelFlagEnum
.
NORMAL
.
getValue
());
userDao
.
insert
(
user
,
true
);
user
Console
Dao
.
insert
(
user
,
true
);
if
(
StringUtils
.
isNotEmpty
(
user
.
getAttachmentId
()))
{
if
(
StringUtils
.
isNotEmpty
(
user
.
getAttachmentId
()))
{
// 更新附件详细信息,关联到这个用户
// 更新附件详细信息,关联到这个用户
fileService
.
updateFile
(
fileService
.
updateFile
(
user
.
getAttachmentId
(),
U
ser
.
class
.
getSimple
Name
(),
String
.
valueOf
(
user
.
getId
()));
user
.
getAttachmentId
(),
u
ser
.
get
Name
(),
String
.
valueOf
(
user
.
getId
()));
}
}
}
}
...
@@ -82,7 +81,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -82,7 +81,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
* @param userId
* @param userId
*/
*/
public
CoreUser
queryUserById
(
Long
userId
)
{
public
CoreUser
queryUserById
(
Long
userId
)
{
return
userDao
.
unique
(
userId
);
return
user
Console
Dao
.
unique
(
userId
);
}
}
/**
/**
...
@@ -92,7 +91,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -92,7 +91,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
* @return
* @return
*/
*/
public
int
updateSysUser
(
CoreUser
user
)
{
public
int
updateSysUser
(
CoreUser
user
)
{
return
userDao
.
updateTemplateById
(
user
);
return
user
Console
Dao
.
updateTemplateById
(
user
);
}
}
/**
/**
...
@@ -111,7 +110,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -111,7 +110,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
user
=
new
CoreUser
();
user
=
new
CoreUser
();
user
.
setId
(
userId
);
user
.
setId
(
userId
);
user
.
setDelFlag
(
DelFlagEnum
.
DELETED
.
getValue
());
user
.
setDelFlag
(
DelFlagEnum
.
DELETED
.
getValue
());
userDao
.
updateTemplateById
(
user
);
user
Console
Dao
.
updateTemplateById
(
user
);
}
}
/**
/**
...
@@ -122,7 +121,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -122,7 +121,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
*/
*/
public
void
batchDelSysUser
(
List
<
Long
>
userIds
)
{
public
void
batchDelSysUser
(
List
<
Long
>
userIds
)
{
try
{
try
{
userDao
.
batchDelUserByIds
(
userIds
);
user
Console
Dao
.
batchDelUserByIds
(
userIds
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
PlatformException
(
"批量删除用户失败"
,
e
);
throw
new
PlatformException
(
"批量删除用户失败"
,
e
);
}
}
...
@@ -135,13 +134,13 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -135,13 +134,13 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
* @param userIds 用户id
* @param userIds 用户id
*/
*/
public
void
batchUpdateUserState
(
List
<
Long
>
userIds
,
GeneralStateEnum
stateEnum
)
{
public
void
batchUpdateUserState
(
List
<
Long
>
userIds
,
GeneralStateEnum
stateEnum
)
{
userDao
.
batchUpdateUserState
(
userIds
,
stateEnum
);
user
Console
Dao
.
batchUpdateUserState
(
userIds
,
stateEnum
);
}
}
/**
/**
* 重置用户密码
* 重置用户密码
*
*
* @param
uI
d
* @param
i
d
* @param password
* @param password
*/
*/
public
int
resetPassword
(
Long
id
,
String
password
)
{
public
int
resetPassword
(
Long
id
,
String
password
)
{
...
@@ -149,11 +148,11 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -149,11 +148,11 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
user
.
setId
(
id
);
user
.
setId
(
id
);
user
.
setPassword
(
passwordEncryptService
.
password
(
password
));
user
.
setPassword
(
passwordEncryptService
.
password
(
password
));
user
.
setUpdateTime
(
new
Date
());
user
.
setUpdateTime
(
new
Date
());
return
userDao
.
updateTemplateById
(
user
);
return
user
Console
Dao
.
updateTemplateById
(
user
);
}
}
public
List
<
CoreUserRole
>
getUserRoles
(
UserRoleQuery
roleQuery
)
{
public
List
<
CoreUserRole
>
getUserRoles
(
UserRoleQuery
roleQuery
)
{
return
userDao
.
queryUserRole
(
return
user
Console
Dao
.
queryUserRole
(
roleQuery
.
getUserId
(),
roleQuery
.
getOrgId
(),
roleQuery
.
getRoleId
());
roleQuery
.
getUserId
(),
roleQuery
.
getOrgId
(),
roleQuery
.
getRoleId
());
}
}
...
@@ -175,7 +174,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
...
@@ -175,7 +174,7 @@ public class UserConsoleService extends CoreBaseService<CoreUser> {
}
}
public
List
<
UserExcelExportData
>
queryExcel
(
PageQuery
<
CoreUser
>
query
)
{
public
List
<
UserExcelExportData
>
queryExcel
(
PageQuery
<
CoreUser
>
query
)
{
PageQuery
<
CoreUser
>
ret
=
userDao
.
queryByCondtion
(
query
);
PageQuery
<
CoreUser
>
ret
=
user
Console
Dao
.
queryByCondtion
(
query
);
List
<
CoreUser
>
list
=
ret
.
getList
();
List
<
CoreUser
>
list
=
ret
.
getList
();
OrgItem
orgRoot
=
platformService
.
buildOrg
();
OrgItem
orgRoot
=
platformService
.
buildOrg
();
List
<
UserExcelExportData
>
items
=
new
ArrayList
<>();
List
<
UserExcelExportData
>
items
=
new
ArrayList
<>();
...
...
plus-admin/admin-console/src/main/resources/application.properties
View file @
d8a7dc4a
...
@@ -4,7 +4,14 @@ user.id=1
...
@@ -4,7 +4,14 @@ user.id=1
user.orgId
=
1
user.orgId
=
1
#\u6253\u5F00\u5BA1\u8BA1\u529F\u80FD\uFF0C\u5F00\u53D1\u6A21\u5F0F\u5E94\u8BE5\u5173\u95ED
#\u6253\u5F00\u5BA1\u8BA1\u529F\u80FD\uFF0C\u5F00\u53D1\u6A21\u5F0F\u5E94\u8BE5\u5173\u95ED
audit.enable
=
false
audit.enable
=
false
server.port
=
8080
server.port
=
8080
server.undertow.accesslog.enabled
=
true
server.undertow.io-threads
=
4
server.undertow.worker-threads
=
20
server.undertow.buffer-size
=
4096
server.undertow.direct-buffers
=
true
spring.datasource.baseDataSource.url
=
jdbc:mysql://127.0.0.1:3306/starter?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&useInformationSchema=true
spring.datasource.baseDataSource.url
=
jdbc:mysql://127.0.0.1:3306/starter?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&useInformationSchema=true
spring.datasource.baseDataSource.username
=
root
spring.datasource.baseDataSource.username
=
root
spring.datasource.baseDataSource.password
=
123456
spring.datasource.baseDataSource.password
=
123456
...
@@ -15,7 +22,6 @@ beetl.suffix=html
...
@@ -15,7 +22,6 @@ beetl.suffix=html
beetlsql.ds.baseDataSource.basePackage
=
com
beetlsql.ds.baseDataSource.basePackage
=
com
beetlsql.ds.baseDataSource.dbStyle
=
org.beetl.sql.core.db.MySqlStyle
beetlsql.ds.baseDataSource.dbStyle
=
org.beetl.sql.core.db.MySqlStyle
#beetlsql.basePackage=com.ibeetl,com.xxx.yourpackage
#beetlsql.basePackage=com.ibeetl,com.xxx.yourpackage
#\u6709\u4E00\u4E2A\u6570\u636E\u6E90\u547D\u540D\u4E3AbaseDataSource,\u4F60\u53EF\u4EE5\u6DFB\u52A0\u591A\u6570\u636E\u6E90
#\u6709\u4E00\u4E2A\u6570\u636E\u6E90\u547D\u540D\u4E3AbaseDataSource,\u4F60\u53EF\u4EE5\u6DFB\u52A0\u591A\u6570\u636E\u6E90
beetlsql.mutiple.datasource
=
baseDataSource
beetlsql.mutiple.datasource
=
baseDataSource
...
...
plus-admin/admin-core/pom.xml
View file @
d8a7dc4a
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>
4.0.0
</modelVersion>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<artifactId>
admin-core
</artifactId>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<artifactId>
admin-core
</artifactId>
<parent>
<packaging>
jar
</packaging>
<groupId>
com.ibeetl
</groupId>
<parent>
<artifactId>
admin
</artifactId>
<groupId>
com.ibeetl
</groupId>
<version>
1.3.2
</version>
<artifactId>
admin
</artifactId>
<relativePath>
../pom.xml
</relativePath>
<version>
1.3.2
</version>
</parent>
<relativePath>
../pom.xml
</relativePath>
<properties>
</parent>
<maven.test.skip>
true
</maven.test.skip>
<properties>
<druid.version>
1.1.10
</druid.version>
<maven.test.skip>
true
</maven.test.skip>
<lombok.version>
1.18.2
</lombok.version>
<druid.version>
1.1.10
</druid.version>
<disruptor.version>
3.4.2
</disruptor.version>
<lombok.version>
1.18.2
</lombok.version>
</properties>
<disruptor.version>
3.4.2
</disruptor.version>
<dependencies>
</properties>
<dependency>
<dependencies>
<groupId>
org.springframework.boot
</groupId>
<dependency>
<artifactId>
spring-boot-starter-web
</artifactId>
<groupId>
org.springframework.boot
</groupId>
</dependency>
<artifactId>
spring-boot-starter-web
</artifactId>
<dependency>
<exclusions>
<groupId>
org.springframework.boot
</groupId>
<exclusion>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<groupId>
org.springframework.boot
</groupId>
</dependency>
<artifactId>
spring-boot-starter-logging
</artifactId>
<dependency>
</exclusion>
<groupId>
org.springframework.boot
</groupId>
<exclusion>
<artifactId>
spring-boot-starter-jdbc
</artifactId>
<groupId>
org.springframework.boot
</groupId>
</dependency>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<dependency>
</exclusion>
<groupId>
org.springframework.boot
</groupId>
</exclusions>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-undertow
</artifactId>
<artifactId>
spring-boot-starter-cache
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jdbc
</artifactId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
com.ibeetl
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
<artifactId>
beetl-framework-starter
</artifactId>
</dependency>
<version>
1.2.13.RELEASE
</version>
<dependency>
</dependency>
<groupId>
org.springframework.boot
</groupId>
<!-- Log4j2 异步支持 -->
<artifactId>
spring-boot-starter-cache
</artifactId>
<dependency>
</dependency>
<groupId>
com.lmax
</groupId>
<dependency>
<artifactId>
disruptor
</artifactId>
<groupId>
org.springframework.boot
</groupId>
<version>
${disruptor.version}
</version>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.session
</groupId>
<groupId>
com.ibeetl
</groupId>
<artifactId>
spring-session-core
</artifactId>
<artifactId>
beetl-framework-starter
</artifactId>
</dependency>
<version>
1.2.13.RELEASE
</version>
<dependency>
</dependency>
<groupId>
org.projectlombok
</groupId>
<!-- Log4j2 异步支持 -->
<artifactId>
lombok
</artifactId>
<dependency>
<version>
${lombok.version}
</version>
<groupId>
com.lmax
</groupId>
<optional>
true
</optional>
<artifactId>
disruptor
</artifactId>
</dependency>
<version>
${disruptor.version}
</version>
<dependency>
</dependency>
<groupId>
com.alibaba
</groupId>
<dependency>
<artifactId>
druid-spring-boot-starter
</artifactId>
<groupId>
org.springframework.session
</groupId>
<version>
${druid.version}
</version>
<artifactId>
spring-session-core
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.zaxxer
</groupId>
<groupId>
org.projectlombok
</groupId>
<artifactId>
HikariCP
</artifactId>
<artifactId>
lombok
</artifactId>
</dependency>
<version>
${lombok.version}
</version>
<!-- <dependency>
<optional>
true
</optional>
<groupId>com.oracle</groupId>
</dependency>
<artifactId>ojdbc6</artifactId>
<dependency>
<version>11.2.0</version>
<groupId>
com.alibaba
</groupId>
</dependency> -->
<artifactId>
druid-spring-boot-starter
</artifactId>
<dependency>
<version>
${druid.version}
</version>
<groupId>
org.jxls
</groupId>
</dependency>
<artifactId>
jxls-reader
</artifactId>
<dependency>
<version>
2.0.3
</version>
<groupId>
com.zaxxer
</groupId>
</dependency>
<artifactId>
HikariCP
</artifactId>
<dependency>
</dependency>
<groupId>
org.jxls
</groupId>
<!-- <dependency>
<artifactId>
jxls
</artifactId>
<groupId>com.oracle</groupId>
<version>
2.4.3
</version>
<artifactId>ojdbc6</artifactId>
<exclusions>
<version>11.2.0</version>
<exclusion>
</dependency> -->
<artifactId>
logback-core
</artifactId>
<dependency>
<groupId>
ch.qos.logback
</groupId>
<groupId>
org.jxls
</groupId>
</exclusion>
<artifactId>
jxls-reader
</artifactId>
</exclusions>
<version>
2.0.3
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.jxls
</groupId>
<groupId>
org.jxls
</groupId>
<artifactId>
jxls-poi
</artifactId>
<artifactId>
jxls
</artifactId>
<version>
1.0.14
</version>
<version>
2.4.3
</version>
</dependency>
<exclusions>
<dependency>
<exclusion>
<groupId>
org.apache.commons
</groupId>
<artifactId>
logback-core
</artifactId>
<artifactId>
commons-lang3
</artifactId>
<groupId>
ch.qos.logback
</groupId>
<version>
3.3.2
</version>
</exclusion>
</dependency>
</exclusions>
<dependency>
</dependency>
<groupId>
org.apache.poi
</groupId>
<dependency>
<artifactId>
poi
</artifactId>
<groupId>
org.jxls
</groupId>
<version>
3.17
</version>
<artifactId>
jxls-poi
</artifactId>
</dependency>
<version>
1.0.14
</version>
<dependency>
</dependency>
<groupId>
org.apache.poi
</groupId>
<dependency>
<artifactId>
poi-ooxml
</artifactId>
<groupId>
org.apache.commons
</groupId>
<version>
3.17
</version>
<artifactId>
commons-lang3
</artifactId>
</dependency>
<version>
3.3.2
</version>
<!-- jwt 的Java库,根据JSON Web Token 官网推荐 -->
</dependency>
<dependency>
<dependency>
<groupId>
org.bitbucket.b_c
</groupId>
<groupId>
org.apache.poi
</groupId>
<artifactId>
jose4j
</artifactId>
<artifactId>
poi
</artifactId>
<version>
0.6.5
</version>
<version>
3.17
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<groupId>
org.apache.poi
</groupId>
<artifactId>
hutool-all
</artifactId>
<artifactId>
poi-ooxml
</artifactId>
<version>
4.6.4
</version>
<version>
3.17
</version>
</dependency>
</dependency>
</dependencies>
<!-- jwt 的Java库,根据JSON Web Token 官网推荐 -->
<dependency>
<groupId>
org.bitbucket.b_c
</groupId>
<artifactId>
jose4j
</artifactId>
<version>
0.6.5
</version>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
4.6.4
</version>
</dependency>
</dependencies>
</project>
</project>
plus-admin/admin-core/src/main/java/com/ibeetl/admin/core/annotation/RequestBodyPlus.java
View file @
d8a7dc4a
...
@@ -5,11 +5,25 @@ import java.lang.annotation.Retention;
...
@@ -5,11 +5,25 @@ import java.lang.annotation.Retention;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
import
java.lang.annotation.Target
;
/**
* 参见 {@link com.ibeetl.admin.core.conf.RequestBodyPlusProcessor} 解析
* @author 一日看尽长安花
*/
@Target
(
ElementType
.
PARAMETER
)
@Target
(
ElementType
.
PARAMETER
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
@interface
RequestBodyPlus
{
public
@interface
RequestBodyPlus
{
/*写入一个json path。默认直接将json转换为被注解的参数的类型对象*/
String
value
()
default
""
;
/**
* 用一个json path 将json请求转换为被注解的参数的类型对象。<br/>
boolean
required
()
default
true
;
* 意图避免原本的{@link org.springframework.web.bind.annotation.RequestBody} 注解必须创建新的对象接收参数,降低项目的类数量<br/>
* 如果默认未空值,则整个json请求都将被转换为参数类型。<br/>
* 以参数类型为目标,有如下情况:<br/>
* Object : json str = {...} ;最终转换为Object<br/>
* Collect : json str = {...} -> [{...}] ; 以集合的泛型类型(如果泛型不存在,以Object为目标)为目标转换为集合中的一个对象(整个json作为一个元素)
* Object : json str = [{....}] ;最终转换为Object<br/>
* Collect : json str = [{...}] -> [{...}] ; 以集合的泛型类型(如果泛型不存在,以Object为目标)为目标转换为集合中的一个对象(整个json作为一个元素)<br/>
* 以上遵循{@link cn.hutool.json.JSONUtil} 的转换规则,忽视转换错误,不能转换时,返回一个空值对象
*/
String
value
()
default
""
;
}
}
plus-admin/admin-core/src/main/java/com/ibeetl/admin/core/conf/MVCConf.java
View file @
d8a7dc4a
package
com.ibeetl.admin.core.conf
;
package
com.ibeetl.admin.core.conf
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.CharsetUtil
;
import
cn.hutool.core.util.ClassUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ReflectUtil
;
import
cn.hutool.core.util.ReflectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.TypeUtil
;
import
cn.hutool.core.util.TypeUtil
;
import
cn.hutool.core.util.URLUtil
;
import
cn.hutool.json.JSON
;
import
cn.hutool.json.JSON
;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.ibeetl.admin.core.annotation.RequestBodyPlus
;
import
com.ibeetl.admin.core.annotation.RequestBodyPlus
;
import
com.ibeetl.admin.core.entity.CoreOrg
;
import
com.ibeetl.admin.core.entity.CoreOrg
;
...
@@ -19,24 +18,18 @@ import com.ibeetl.admin.core.service.CoreUserService;
...
@@ -19,24 +18,18 @@ import com.ibeetl.admin.core.service.CoreUserService;
import
com.ibeetl.admin.core.util.HttpRequestLocal
;
import
com.ibeetl.admin.core.util.HttpRequestLocal
;
import
com.ibeetl.admin.core.util.JoseJwtUtil
;
import
com.ibeetl.admin.core.util.JoseJwtUtil
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.lang.reflect.Type
;
import
java.lang.reflect.Type
;
import
java.lang.reflect.TypeVariable
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Optional
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpSession
;
import
javax.servlet.http.HttpSession
;
import
jdk.nashorn.internal.ir.ReturnNode
;
import
org.beetl.core.GroupTemplate
;
import
org.beetl.core.GroupTemplate
;
import
org.beetl.ext.spring.BeetlGroupUtilConfiguration
;
import
org.beetl.ext.spring.BeetlGroupUtilConfiguration
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.Conventions
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.format.FormatterRegistry
;
import
org.springframework.format.FormatterRegistry
;
...
@@ -44,16 +37,9 @@ import org.springframework.format.datetime.DateFormatter;
...
@@ -44,16 +37,9 @@ import org.springframework.format.datetime.DateFormatter;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.converter.HttpMessageConverter
;
import
org.springframework.http.converter.HttpMessageConverter
;
import
org.springframework.http.converter.HttpMessageNotReadableException
;
import
org.springframework.http.converter.StringHttpMessageConverter
;
import
org.springframework.http.converter.StringHttpMessageConverter
;
import
org.springframework.http.server.ServletServerHttpRequest
;
import
org.springframework.http.server.ServletServerHttpRequest
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.HttpMediaTypeNotSupportedException
;
import
org.springframework.web.accept.ContentNegotiationManager
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.WebDataBinder
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.support.WebDataBinderFactory
;
import
org.springframework.web.bind.support.WebDataBinderFactory
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
...
@@ -65,7 +51,6 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
...
@@ -65,7 +51,6 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor
;
import
org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor
;
import
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
;
import
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
;
import
sun.plugin2.util.ColorUtil
;
@Configuration
@Configuration
public
class
MVCConf
implements
WebMvcConfigurer
,
InitializingBean
{
public
class
MVCConf
implements
WebMvcConfigurer
,
InitializingBean
{
...
@@ -94,8 +79,7 @@ public class MVCConf implements WebMvcConfigurer, InitializingBean {
...
@@ -94,8 +79,7 @@ public class MVCConf implements WebMvcConfigurer, InitializingBean {
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
registry
.
addInterceptor
(
new
SessionInterceptor
(
httpRequestLocal
,
userService
))
.
addInterceptor
(
new
SessionInterceptor
(
httpRequestLocal
,
userService
))
.
addPathPatterns
(
"/**"
)
.
addPathPatterns
(
"/**"
);
.
excludePathPatterns
(
"/user/login"
,
"/error"
,
"/logout"
);
// super.addInterceptors(registry);
// super.addInterceptors(registry);
}
}
...
@@ -142,6 +126,11 @@ class SessionInterceptor implements HandlerInterceptor {
...
@@ -142,6 +126,11 @@ class SessionInterceptor implements HandlerInterceptor {
@Override
@Override
public
boolean
preHandle
(
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
{
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
{
httpRequestLocal
.
set
(
request
);
if
(
StrUtil
.
containsAny
(
request
.
getRequestURI
(),
"/user/login"
,
"/error"
,
"/logout"
))
{
return
true
;
}
String
token
=
request
.
getHeader
(
HttpHeaders
.
AUTHORIZATION
);
String
token
=
request
.
getHeader
(
HttpHeaders
.
AUTHORIZATION
);
Map
<
String
,
Object
>
payload
=
JoseJwtUtil
.
parsePayload
(
token
);
Map
<
String
,
Object
>
payload
=
JoseJwtUtil
.
parsePayload
(
token
);
if
(
payload
.
isEmpty
())
{
if
(
payload
.
isEmpty
())
{
...
@@ -161,7 +150,6 @@ class SessionInterceptor implements HandlerInterceptor {
...
@@ -161,7 +150,6 @@ class SessionInterceptor implements HandlerInterceptor {
requestSession
.
setAttribute
(
CorePlatformService
.
ACCESS_USER_ORGS
,
orgs
);
requestSession
.
setAttribute
(
CorePlatformService
.
ACCESS_USER_ORGS
,
orgs
);
requestSession
.
setAttribute
(
"ip"
,
httpRequestLocal
.
getRequestIP
());
requestSession
.
setAttribute
(
"ip"
,
httpRequestLocal
.
getRequestIP
());
}
}
httpRequestLocal
.
set
(
request
);
return
true
;
return
true
;
}
}
...
@@ -181,9 +169,10 @@ class SessionInterceptor implements HandlerInterceptor {
...
@@ -181,9 +169,10 @@ class SessionInterceptor implements HandlerInterceptor {
}
}
}
}
/** 自定义
注解
,用json path 的方式注入json
类型
的参数 */
/** 自定义
SpringMVC的controller参数注解 {@link RequestBodyPlus} 的注入解析
,用json path 的方式注入json
请求
的参数 */
class
RequestBodyPlusProcessor
extends
AbstractMessageConverterMethodProcessor
{
class
RequestBodyPlusProcessor
extends
AbstractMessageConverterMethodProcessor
{
private
static
final
ThreadLocal
<
String
>
bodyLocal
=
ThreadLocal
.
withInitial
(()
->
null
);
private
static
final
ThreadLocal
<
String
>
bodyLocal
=
ThreadLocal
.
withInitial
(()
->
"{}"
);
protected
RequestBodyPlusProcessor
(
List
<
HttpMessageConverter
<?>>
converters
)
{
protected
RequestBodyPlusProcessor
(
List
<
HttpMessageConverter
<?>>
converters
)
{
super
(
converters
);
super
(
converters
);
...
@@ -203,10 +192,10 @@ class RequestBodyPlusProcessor extends AbstractMessageConverterMethodProcessor {
...
@@ -203,10 +192,10 @@ class RequestBodyPlusProcessor extends AbstractMessageConverterMethodProcessor {
throws
Exception
{
throws
Exception
{
parameter
=
parameter
.
nestedIfOptional
();
parameter
=
parameter
.
nestedIfOptional
();
/*非json请求过滤*/
/*非json请求过滤*/
Class
<?>
parameter
Type
=
parameter
.
getNestedParameterType
();
Class
<?>
parameter
Class
=
parameter
.
getNestedParameterType
();
if
(!
StrUtil
.
containsAny
(
if
(!
StrUtil
.
containsAny
(
webRequest
.
getHeader
(
HttpHeaders
.
CONTENT_TYPE
),
MediaType
.
APPLICATION_JSON_VALUE
))
{
webRequest
.
getHeader
(
HttpHeaders
.
CONTENT_TYPE
),
MediaType
.
APPLICATION_JSON_VALUE
))
{
return
ReflectUtil
.
newInstanceIfPossible
(
parameter
Type
);
return
ReflectUtil
.
newInstanceIfPossible
(
parameter
Class
);
}
}
HttpServletRequest
servletRequest
=
webRequest
.
getNativeRequest
(
HttpServletRequest
.
class
);
HttpServletRequest
servletRequest
=
webRequest
.
getNativeRequest
(
HttpServletRequest
.
class
);
...
@@ -214,23 +203,35 @@ class RequestBodyPlusProcessor extends AbstractMessageConverterMethodProcessor {
...
@@ -214,23 +203,35 @@ class RequestBodyPlusProcessor extends AbstractMessageConverterMethodProcessor {
ServletServerHttpRequest
inputMessage
=
new
ServletServerHttpRequest
(
servletRequest
);
ServletServerHttpRequest
inputMessage
=
new
ServletServerHttpRequest
(
servletRequest
);
StringHttpMessageConverter
stringHttpMessageConverter
=
new
StringHttpMessageConverter
();
StringHttpMessageConverter
stringHttpMessageConverter
=
new
StringHttpMessageConverter
();
String
jsonBody
=
Optional
.
ofNullable
(
bodyLocal
.
get
())
String
jsonBody
;
.
orElseGet
(
try
{
()
->
{
String
readBody
=
stringHttpMessageConverter
.
read
(
String
.
class
,
inputMessage
);
try
{
/*每一个参数的注入都会读取一次输入流,但是request的输入流不可重复读,所以需要保持下来*/
bodyLocal
.
set
(
stringHttpMessageConverter
.
read
(
String
.
class
,
inputMessage
));
if
(
StrUtil
.
isBlank
(
readBody
))
{
}
catch
(
IOException
e
)
{
jsonBody
=
bodyLocal
.
get
();
logger
.
error
(
"can't read request body by input stream : {}"
,
e
);
}
else
{
}
bodyLocal
.
set
(
readBody
);
return
bodyLocal
.
get
();
jsonBody
=
bodyLocal
.
get
();
});
}
}
catch
(
IOException
e
)
{
logger
.
error
(
"Can't read request body by input stream : {}"
,
e
);
jsonBody
=
bodyLocal
.
get
();
}
RequestBodyPlus
requestBodyPlus
=
parameter
.
getParameterAnnotation
(
RequestBodyPlus
.
class
);
RequestBodyPlus
requestBodyPlus
=
parameter
.
getParameterAnnotation
(
RequestBodyPlus
.
class
);
JSON
json
=
JSONUtil
.
parse
(
jsonBody
);
JSON
json
=
JSONUtil
.
parse
(
jsonBody
);
Object
parseVal
=
json
.
getByPath
(
requestBodyPlus
.
value
(),
parameterType
);
Object
parseVal
=
json
.
getByPath
(
requestBodyPlus
.
value
(),
parameterClass
);
/*TODO 待将json转成对象*/
if
(
parseVal
instanceof
Map
)
{
System
.
out
.
println
(
JSONUtil
.
parse
(
"{'users':[ {'user':{'name':'lisi'}} ]}"
).
getByPath
(
"users"
));
JSONObject
jsonObject
=
JSONUtil
.
parseObj
(
parseVal
);
parseVal
=
JSONUtil
.
toBean
(
jsonObject
,
parameter
.
getNestedGenericParameterType
(),
true
);
}
else
if
(
parseVal
instanceof
List
)
{
JSONArray
jsonArray
=
JSONUtil
.
parseArray
(
parseVal
);
Type
parameterType
=
TypeUtil
.
getTypeArgument
(
parameter
.
getNestedGenericParameterType
());
Class
parameterTypeClass
=
null
==
parameterType
?
Object
.
class
:
ClassUtil
.
loadClass
(
parameterType
.
getTypeName
());
parseVal
=
JSONUtil
.
toList
(
jsonArray
,
parameterTypeClass
);
}
return
parseVal
;
return
parseVal
;
}
}
...
...
plus-admin/admin-core/src/main/java/com/ibeetl/admin/core/util/JoseJwtUtil.java
View file @
d8a7dc4a
package
com.ibeetl.admin.core.util
;
package
com.ibeetl.admin.core.util
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.map.MapUtil
;
import
cn.hutool.core.map.MapUtil
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Random
;
import
java.util.Random
;
import
org.jose4j.jwk.RsaJsonWebKey
;
import
org.jose4j.jwk.RsaJsonWebKey
;
...
@@ -20,28 +16,35 @@ import org.slf4j.Logger;
...
@@ -20,28 +16,35 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
/**
/**
* 基于jose4j的jwt库工具类。 包括:生成,反生成
* 基于jose4j的jwt库工具类。 包括:生成,验证,解析负载。<br/>
* 可以用对称加密算法在此对token进行加密,逻辑上可以每隔一周或者一天,动态生成对称加密算法的密钥,然后防止破解。<br/>
* 这样可以用jwt来承担更多的数据传递。至于客官怎么选择——萝卜青菜各有所爱<br/>
*
*
* @author 一日看尽长安花
* @author 一日看尽长安花
*/
*/
public
class
JoseJwtUtil
{
public
class
JoseJwtUtil
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
JoseJwtUtil
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
JoseJwtUtil
.
class
);
public
static
String
generateJwtJson
(
String
uid
,
float
expiration
)
{
public
static
String
generateJwtJson
(
String
uid
)
{
JwtClaims
jwtClaims
=
new
JwtClaims
();
JwtClaims
jwtClaims
=
new
JwtClaims
();
jwtClaims
.
setExpirationTimeMinutesInTheFuture
(
expiration
);
// 以分钟为单位的过期时间
jwtClaims
.
setExpirationTimeMinutesInTheFuture
(
30
);
jwtClaims
.
setIssuer
(
"Issuer"
);
// who creates the token and signs it
/* 以分钟为单位的过期时间 */
jwtClaims
.
setAudience
(
"Audience"
);
// to whom the token is intended to be sent
/* who creates the token and signs it */
jwtClaims
.
setGeneratedJwtId
();
// a unique identifier for the token
jwtClaims
.
setIssuer
(
"Issuer"
);
jwtClaims
.
setIssuedAtToNow
();
// when the token was issued/created (now)
/* to whom the token is intended to be sent */
jwtClaims
.
setNotBeforeMinutesInThePast
(
jwtClaims
.
setAudience
(
"Audience"
);
2
);
// time before which the token is not yet valid (2 minutes ago)
/* a unique identifier for the token */
jwtClaims
.
setGeneratedJwtId
();
/* when the token was issued/created (now) */
jwtClaims
.
setIssuedAtToNow
();
/* time before which the token is not yet valid (2 minutes ago) */
jwtClaims
.
setNotBeforeMinutesInThePast
(
2
);
/*主题:签证*/
/*主题:签证*/
jwtClaims
.
setSubject
(
"Bearer"
);
jwtClaims
.
setSubject
(
"Bearer"
);
/*用户id*/
/*用户id*/
jwtClaims
.
setClaim
(
"uid"
,
uid
);
jwtClaims
.
setClaim
(
"uid"
,
uid
);
/*登录时间*/
/*登录时间*/
jwtClaims
.
setClaim
(
"ltm"
,
new
Date
().
getTime
());
jwtClaims
.
setClaim
(
"ltm"
,
System
.
currentTimeMillis
());
RsaJsonWebKey
rsaJsonWebKey
=
RsaJsonWebKeyBuilder
.
getRasJsonWebKeyInstance
();
RsaJsonWebKey
rsaJsonWebKey
=
RsaJsonWebKeyBuilder
.
getRasJsonWebKeyInstance
();
JsonWebSignature
jsonWebSignature
=
new
JsonWebSignature
();
JsonWebSignature
jsonWebSignature
=
new
JsonWebSignature
();
...
...
plus-admin/admin-core/src/main/java/com/ibeetl/admin/core/web/IndexController.java
View file @
d8a7dc4a
package
com.ibeetl.admin.core.web
;
package
com.ibeetl.admin.core.web
;
import
cn.hutool.core.map.MapUtil
;
import
com.ibeetl.admin.core.annotation.RequestBodyPlus
;
import
com.ibeetl.admin.core.annotation.RequestBodyPlus
;
import
com.ibeetl.admin.core.entity.CoreOrg
;
import
com.ibeetl.admin.core.entity.CoreUser
;
import
com.ibeetl.admin.core.rbac.UserLoginInfo
;
import
com.ibeetl.admin.core.rbac.tree.MenuItem
;
import
com.ibeetl.admin.core.service.CorePlatformService
;
import
com.ibeetl.admin.core.service.CoreUserService
;
import
com.ibeetl.admin.core.util.HttpRequestLocal
;
import
com.ibeetl.admin.core.util.JoseJwtUtil
;
import
com.ibeetl.admin.core.util.PlatformException
;
import
java.util.Enumeration
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
import
javax.servlet.http.HttpSession
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.Re
questParam
;
import
org.springframework.web.bind.annotation.Re
sponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.ibeetl.admin.core.entity.CoreOrg
;
import
com.ibeetl.admin.core.entity.CoreUser
;
import
com.ibeetl.admin.core.rbac.UserLoginInfo
;
import
com.ibeetl.admin.core.rbac.tree.MenuItem
;
import
com.ibeetl.admin.core.service.CorePlatformService
;
import
com.ibeetl.admin.core.service.CoreUserService
;
import
com.ibeetl.admin.core.util.HttpRequestLocal
;
import
com.ibeetl.admin.core.util.PlatformException
;
@Controller
@Controller
public
class
IndexController
{
public
class
IndexController
{
...
@@ -63,12 +59,11 @@ public class IndexController {
...
@@ -63,12 +59,11 @@ public class IndexController {
return view;
return view;
}*/
}*/
@CrossOrigin
@PostMapping
(
"/user/login"
)
@PostMapping
(
"/user/login"
)
@ResponseBody
public
Object
login
(
public
Object
login
(
@RequestBodyPlus
(
"username"
)
String
username
,
String
password
,
@RequestBodyPlus
Map
params
)
{
@RequestBodyPlus
(
"username"
)
String
username
,
@RequestBodyPlus
(
"password"
)
String
password
)
{
UserLoginInfo
info
=
userService
.
login
(
username
,
password
);
UserLoginInfo
info
=
userService
.
login
(
username
,
password
);
System
.
out
.
println
(
params
);
if
(
info
==
null
)
{
if
(
info
==
null
)
{
throw
new
PlatformException
(
"用户名密码错误"
);
throw
new
PlatformException
(
"用户名密码错误"
);
}
}
...
@@ -84,7 +79,9 @@ public class IndexController {
...
@@ -84,7 +79,9 @@ public class IndexController {
info
.
setCurrentOrg
(
currentOrg
);
info
.
setCurrentOrg
(
currentOrg
);
// 记录登录信息到session
// 记录登录信息到session
this
.
platformService
.
setLoginUser
(
info
.
getUser
(),
info
.
getCurrentOrg
(),
info
.
getOrgs
());
this
.
platformService
.
setLoginUser
(
info
.
getUser
(),
info
.
getCurrentOrg
(),
info
.
getOrgs
());
return
null
;
Map
<
Object
,
Object
>
resultMap
=
MapUtil
.
builder
()
.
put
(
"token"
,
JoseJwtUtil
.
generateJwtJson
(
String
.
valueOf
(
user
.
getId
()))).
build
();
return
JsonResult
.
success
(
resultMap
);
}
}
@RequestMapping
(
"/index.do"
)
@RequestMapping
(
"/index.do"
)
...
...
plus-admin/pom.xml
View file @
d8a7dc4a
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.ibeetl
</groupId>
<groupId>
com.ibeetl
</groupId>
<artifactId>
admin
</artifactId>
<artifactId>
admin
</artifactId>
<version>
1.3.2
</version>
<version>
1.3.2
</version>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<modules>
<modules>
<module>
./admin-core
</module>
<module>
./admin-core
</module>
<module>
./admin-console
</module>
<module>
./admin-console
</module>
</modules>
</modules>
<parent>
<parent>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.1.7.RELEASE
</version>
<version>
2.1.7.RELEASE
</version>
</parent>
</parent>
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<compiler.encoding>
UTF-8
</compiler.encoding>
<compiler.encoding>
UTF-8
</compiler.encoding>
</properties>
</properties>
<!-- Add typical dependencies for a web application -->
<!-- Add typical dependencies for a web application -->
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
<artifactId>
spring-boot-starter
</artifactId>
<exclusions>
<exclusions>
<exclusion>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusion>
</exclusions>
<exclusion>
</dependency>
<groupId>
org.springframework.boot
</groupId>
<dependency>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<groupId>
org.springframework.boot
</groupId>
</exclusion>
<artifactId>
spring-boot-devtools
</artifactId>
</exclusions>
<optional>
true
</optional>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-undertow
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
</dependency>
<scope>
test
</scope>
<dependency>
</dependency>
<groupId>
org.springframework.boot
</groupId>
<dependency>
<artifactId>
spring-boot-devtools
</artifactId>
<groupId>
org.springframework.boot
</groupId>
<optional>
true
</optional>
<artifactId>
spring-boot-configuration-processor
</artifactId>
</dependency>
<optional>
true
</optional>
<dependency>
</dependency>
<groupId>
org.springframework.boot
</groupId>
<dependency>
<artifactId>
spring-boot-starter-test
</artifactId>
<groupId>
org.springframework.boot
</groupId>
<scope>
test
</scope>
<artifactId>
spring-boot-starter-integration
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-starter-quartz
</artifactId>
<optional>
true
</optional>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
lombok
</artifactId>
<artifactId>
spring-boot-starter-integration
</artifactId>
<version>
1.18.8
</version>
</dependency>
<scope>
provided
</scope>
<dependency>
</dependency>
<groupId>
org.springframework.boot
</groupId>
</dependencies>
<artifactId>
spring-boot-starter-quartz
</artifactId>
<build>
</dependency>
<plugins>
<dependency>
<plugin>
<groupId>
org.projectlombok
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
lombok
</artifactId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
1.18.8
</version>
<configuration>
<scope>
provided
</scope>
<source>
1.8
</source>
</dependency>
<target>
1.8
</target>
</dependencies>
<parameters>
true
</parameters>
<build>
</configuration>
<plugins>
</plugin>
<plugin>
</plugins>
<groupId>
org.apache.maven.plugins
</groupId>
</build>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
<parameters>
true
</parameters>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>
ve-admin/admin-web/src/views/login/index.vue
View file @
d8a7dc4a
...
@@ -116,7 +116,7 @@ export default {
...
@@ -116,7 +116,7 @@ export default {
return
{
return
{
loginForm
:
{
loginForm
:
{
username
:
'
admin
'
,
username
:
'
admin
'
,
password
:
'
1
11111
'
password
:
'
1
23456
'
},
},
loginRules
:
{
loginRules
:
{
username
:
[
username
:
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment