Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
shop-Mall
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
shop-Mall
Commits
69ac552f
Commit
69ac552f
authored
Mar 27, 2021
by
m1991
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台接口——用户与资讯后台接口
parent
a7d955c5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1069 additions
and
231 deletions
+1069
-231
pom.xml
pom.xml
+6
-1
wisenergy-common.iml
wisenergy-common/wisenergy-common.iml
+197
-1
wisenergy-mapper.iml
wisenergy-mapper/wisenergy-mapper.iml
+174
-1
wisenergy-model.iml
wisenergy-model/wisenergy-model.iml
+171
-0
wisenergy-parent.iml
wisenergy-parent.iml
+11
-1
pom.xml
wisenergy-web-admin/pom.xml
+6
-0
TestController1.java
...n/wisenergy/web/admin/controller/app/TestController1.java
+227
-227
ShiroConfig.java
...in/src/main/java/cn/wisenergy/web/config/ShiroConfig.java
+2
-0
SigarConfig.java
...in/src/main/java/cn/wisenergy/web/config/SigarConfig.java
+62
-0
JwtUtil.java
...b-admin/src/main/java/cn/wisenergy/web/shiro/JwtUtil.java
+1
-0
wisenergy-web-admin.iml
wisenergy-web-admin/wisenergy-web-admin.iml
+212
-0
No files found.
pom.xml
View file @
69ac552f
...
...
@@ -162,7 +162,12 @@
<artifactId>
ffmpeg-platform
</artifactId>
<version>
4.0.2-1.4.3
</version>
</dependency>
<!--获取服务器硬件信息-->
<dependency>
<groupId>
org.fusesource
</groupId>
<artifactId>
sigar
</artifactId>
<version>
${sigar.version}
</version>
</dependency>
<!--druid数据源 -->
<dependency>
...
...
wisenergy-common/wisenergy-common.iml
View file @
69ac552f
This diff is collapsed.
Click to expand it.
wisenergy-mapper/wisenergy-mapper.iml
View file @
69ac552f
This diff is collapsed.
Click to expand it.
wisenergy-model/wisenergy-model.iml
View file @
69ac552f
This diff is collapsed.
Click to expand it.
wisenergy-parent.iml
View file @
69ac552f
<?xml version="1.0" encoding="UTF-8"?>
<module
org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule=
"true"
type=
"JAVA_MODULE"
version=
"4"
/>
\ No newline at end of file
<module
org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule=
"true"
version=
"4"
>
<component
name=
"NewModuleRootManager"
LANGUAGE_LEVEL=
"JDK_1_8"
>
<output
url=
"file://$MODULE_DIR$/target/classes"
/>
<output-test
url=
"file://$MODULE_DIR$/target/test-classes"
/>
<content
url=
"file://$MODULE_DIR$"
>
<excludeFolder
url=
"file://$MODULE_DIR$/target"
/>
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
\ No newline at end of file
wisenergy-web-admin/pom.xml
View file @
69ac552f
...
...
@@ -64,6 +64,12 @@
<artifactId>
thumbnailator
</artifactId>
<version>
0.4.8
</version>
</dependency>
<!--获取服务器硬件信息-->
<dependency>
<groupId>
org.fusesource
</groupId>
<artifactId>
sigar
</artifactId>
<version>
1.6.4
</version>
</dependency>
</dependencies>
<!-- MAVEN构建 -->
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/TestController1.java
View file @
69ac552f
This diff is collapsed.
Click to expand it.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/config/ShiroConfig.java
View file @
69ac552f
...
...
@@ -58,7 +58,9 @@ public class ShiroConfig {
// 设置拦截器集合
Map
<
String
,
String
>
filterChainDefinitionMap
=
new
LinkedHashMap
<
String
,
String
>();
filterChainDefinitionMap
.
put
(
"/authInformation/save"
,
"anon"
);
//存储设备IMEI号和手机SIM卡ID号
filterChainDefinitionMap
.
put
(
"/sys/login"
,
"anon"
);
// 登录页面-身份认证
filterChainDefinitionMap
.
put
(
"/sys/registered"
,
"anon"
);
// 注册页面
filterChainDefinitionMap
.
put
(
"/swagger-ui.html"
,
"anon"
);
// swagger接口-匿名访问
filterChainDefinitionMap
.
put
(
"/swagger/**"
,
"anon"
);
filterChainDefinitionMap
.
put
(
"/swagger-resources/**"
,
"anon"
);
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/config/SigarConfig.java
0 → 100644
View file @
69ac552f
package
cn
.
wisenergy
.
web
.
config
;
import
lombok.extern.slf4j.Slf4j
;
import
org.hyperic.jni.ArchNotSupportedException
;
import
org.hyperic.sigar.Sigar
;
import
org.hyperic.sigar.SigarLoader
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.DefaultResourceLoader
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.ResourceLoader
;
import
java.io.*
;
/**
* Created by m1991 on 2021/3/23 16:50
*/
@Slf4j
@Configuration
public
class
SigarConfig
{
static
{
try
{
initSigar
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
/**
* 初始化sigar的配置文件
*/
public
static
void
initSigar
()
throws
IOException
{
SigarLoader
loader
=
new
SigarLoader
(
Sigar
.
class
);
String
lib
=
null
;
try
{
lib
=
loader
.
getLibraryName
();
log
.
info
(
"init sigar so文件====================="
+
lib
);
}
catch
(
ArchNotSupportedException
var7
)
{
log
.
error
(
"initSigar() error:{}"
,
var7
.
getMessage
());
}
ResourceLoader
resourceLoader
=
new
DefaultResourceLoader
();
Resource
resource
=
resourceLoader
.
getResource
(
"classpath:/sigar.so/"
+
lib
);
if
(
resource
.
exists
())
{
InputStream
is
=
resource
.
getInputStream
();
File
tempDir
=
new
File
(
"./log"
);
if
(!
tempDir
.
exists
()){
tempDir
.
mkdirs
();
}
BufferedOutputStream
os
=
new
BufferedOutputStream
(
new
FileOutputStream
(
new
File
(
tempDir
,
lib
),
false
));
int
lentgh
=
0
;
while
((
lentgh
=
is
.
read
())
!=
-
1
){
os
.
write
(
lentgh
);
}
is
.
close
();
os
.
close
();
System
.
setProperty
(
"org.hyperic.sigar.path"
,
tempDir
.
getCanonicalPath
());
}
}
}
\ No newline at end of file
wisenergy-web-admin/src/main/java/cn/wisenergy/web/shiro/JwtUtil.java
View file @
69ac552f
package
cn
.
wisenergy
.
web
.
shiro
;
import
cn.wisenergy.common.enums.RespCodeEnum
;
import
cn.wisenergy.model.app.User
;
import
cn.wisenergy.web.config.JwtConfig
;
import
com.alibaba.fastjson.JSON
;
...
...
wisenergy-web-admin/wisenergy-web-admin.iml
View file @
69ac552f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
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