Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Imagedx
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
VideoAIService
Imagedx
Commits
7c820595
Commit
7c820595
authored
May 14, 2021
by
wangjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉邮件
parent
1c9f34e4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
53 deletions
+33
-53
src/main/java/im/zhaojun/system/controller/LoginController.java
...in/java/im/zhaojun/system/controller/LoginController.java
+0
-10
src/main/java/im/zhaojun/system/service/MailService.java
src/main/java/im/zhaojun/system/service/MailService.java
+19
-27
src/main/resources/application.properties
src/main/resources/application.properties
+4
-6
src/main/resources/static/js/jkgl/jkgl - 副本.js
src/main/resources/static/js/jkgl/jkgl - 副本.js
+3
-3
src/main/resources/static/js/jkgl/jkgl.js
src/main/resources/static/js/jkgl/jkgl.js
+3
-3
src/main/resources/static/js/manualscreen/sjcx.js
src/main/resources/static/js/manualscreen/sjcx.js
+1
-1
src/main/resources/static/js/sjcx/gcjl.js
src/main/resources/static/js/sjcx/gcjl.js
+1
-1
src/main/resources/static/js/sjcx/sjcx.js
src/main/resources/static/js/sjcx/sjcx.js
+1
-1
src/main/resources/static/js/sjfx/sjfx.js
src/main/resources/static/js/sjfx/sjfx.js
+1
-1
No files found.
src/main/java/im/zhaojun/system/controller/LoginController.java
View file @
7c820595
...
...
@@ -39,8 +39,6 @@ public class LoginController {
@Resource
private
UserService
userService
;
@Resource
private
MailService
mailService
;
@Resource
private
TemplateEngine
templateEngine
;
...
...
@@ -69,14 +67,6 @@ public class LoginController {
public
ResultBean
login
(
User
user
,
@RequestParam
(
value
=
"captcha"
,
required
=
false
)
String
captcha
,
HttpServletResponse
response
)
{
Subject
subject
=
SecurityUtils
.
getSubject
();
// // 如果开启了登录校验
// if (shiroActionProperties.getLoginVerify()) {
// String realCaptcha = (String) SecurityUtils.getSubject().getSession().getAttribute("captcha");
// // session 中的验证码过期了
// if (realCaptcha == null || !realCaptcha.equals(captcha.toLowerCase())) {
// throw new CaptchaIncorrectException();
// }
// }
UsernamePasswordToken
token
=
new
UsernamePasswordToken
(
user
.
getUsername
(),
user
.
getPassword
());
subject
.
login
(
token
);
...
...
src/main/java/im/zhaojun/system/service/MailService.java
View file @
7c820595
package
im
.
zhaojun
.
system
.
service
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.mail.javamail.JavaMailSender
;
import
org.springframework.mail.javamail.MimeMessageHelper
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.mail.MessagingException
;
import
javax.mail.internet.MimeMessage
;
@Service
//@Service
public
class
MailService
{
@Value
(
"${spring.mail.username}"
)
private
String
form
;
//
@Value("${spring.mail.username}")
//
private String form;
@Resource
private
JavaMailSender
mailSender
;
//
@Resource
//
private JavaMailSender mailSender;
public
void
sendHTMLMail
(
String
to
,
String
subject
,
String
content
)
{
MimeMessage
mimeMessage
=
mailSender
.
createMimeMessage
();
MimeMessageHelper
helper
;
try
{
helper
=
new
MimeMessageHelper
(
mimeMessage
,
true
);
helper
.
setTo
(
to
);
helper
.
setSubject
(
subject
);
helper
.
setText
(
content
,
true
);
helper
.
setFrom
(
form
);
}
catch
(
MessagingException
e
)
{
e
.
printStackTrace
();
}
mailSender
.
send
(
mimeMessage
);
}
//
public void sendHTMLMail(String to, String subject, String content) {
//
MimeMessage mimeMessage = mailSender.createMimeMessage();
//
MimeMessageHelper helper;
//
try {
//
helper = new MimeMessageHelper(mimeMessage, true);
//
helper.setTo(to);
//
helper.setSubject(subject);
//
helper.setText(content, true);
//
helper.setFrom(form);
//
} catch (MessagingException e) {
//
e.printStackTrace();
//
}
//
mailSender.send(mimeMessage);
//
}
}
src/main/resources/application.properties
View file @
7c820595
...
...
@@ -5,7 +5,8 @@ server.port=8082
spring.datasource.username
=
root
spring.datasource.password
=
123456
spring.datasource.url
=
jdbc:mysql://172.16.24.153:3306/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false
#spring.datasource.url=jdbc:mysql://172.16.24.153:3306/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.url
=
jdbc:mysql://192.168.168.212:3306/imagepro?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.filters
=
stat
...
...
@@ -25,15 +26,12 @@ spring.datasource.maxOpenPreparedStatements= 20
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone
=
GMT+8
#
spring.redis.host
=
172.16.24.153
spring.redis.host
=
127.0.0.1
#spring.redis.host=172.16.24.153
spring.redis.port
=
6379
spring.cache.type
=
redis
spring.cache.redis.time-to-live
=
600000
#spring.redis.password=123456
spring.mail.host
=
smtp.163.com
spring.mail.username
=
shiro_action@163.com
spring.mail.password
=
shiro123
spring.mail.default-encoding
=
utf-8
mybatis.configuration.map-underscore-to-camel-case
=
true
mybatis.mapper-locations
=
classpath:mapper/*.xml
...
...
src/main/resources/static/js/jkgl/jkgl - 副本.js
View file @
7c820595
...
...
@@ -1249,7 +1249,7 @@ let arr_right_s = [];
//websocket连接
let
d
=
new
Date
().
getTime
();
let
web_ip
=
"
ws:/localhost:8089/websocket/
"
+
d
;
let
web_ip
=
"
ws:/
/
localhost:8089/websocket/
"
+
d
;
let
wss
=
new
WebSocket
(
web_ip
);
wss
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
@@ -1532,7 +1532,7 @@ $('[name="status"]').bootstrapSwitch({
//推送近5分钟数据
function
websocket_s
(
ds
)
{
let
web_ips
=
"
ws:/localhost:8089/websocket/
"
+
ds
;
let
web_ips
=
"
ws:/
/
localhost:8089/websocket/
"
+
ds
;
ws_j5fz
=
new
WebSocket
(
web_ips
);
ws_j5fz
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
@@ -1582,7 +1582,7 @@ function websocket_s(ds) {
//推送自动规则
function
websocket_gzdj
(
video_id
,
items
,
indexs_1
)
{
let
web_ips
=
"
ws:/localhost:8089/websocket/
"
+
video_id
;
let
web_ips
=
"
ws:/
/
localhost:8089/websocket/
"
+
video_id
;
let
ws_gzdj
=
new
WebSocket
(
web_ips
);
ws_gzdj
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
src/main/resources/static/js/jkgl/jkgl.js
View file @
7c820595
...
...
@@ -1249,7 +1249,7 @@ let arr_right_s = [];
//websocket连接
let
d
=
new
Date
().
getTime
();
let
web_ip
=
"
ws:/
localhost
:8089/websocket/
"
+
d
;
let
web_ip
=
"
ws:/
/127.0.0.1
:8089/websocket/
"
+
d
;
let
wss
=
new
WebSocket
(
web_ip
);
wss
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
@@ -1520,7 +1520,7 @@ $('[name="status"]').bootstrapSwitch({
//推送近5分钟数据
function
websocket_s
(
ds
)
{
let
web_ips
=
"
ws:/localhost:8089/websocket/
"
+
ds
;
let
web_ips
=
"
ws:/
/
localhost:8089/websocket/
"
+
ds
;
ws_j5fz
=
new
WebSocket
(
web_ips
);
ws_j5fz
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
@@ -1570,7 +1570,7 @@ function websocket_s(ds) {
//推送自动规则
function
websocket_gzdj
(
video_id
,
items
,
indexs_1
)
{
let
web_ips
=
"
ws:/localhost:8089/websocket/
"
+
video_id
;
let
web_ips
=
"
ws:/
/
localhost:8089/websocket/
"
+
video_id
;
let
ws_gzdj
=
new
WebSocket
(
web_ips
);
ws_gzdj
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
src/main/resources/static/js/manualscreen/sjcx.js
View file @
7c820595
...
...
@@ -618,7 +618,7 @@ $('[data-gallery=manual]').click(function (e) {
new
PhotoViewer
(
items
,
options
);
});
let
d
=
new
Date
().
getTime
();
let
web_ip
=
"
ws:/
localhost
:8089/websocket/
"
+
d
;
let
web_ip
=
"
ws:/
/127.0.0.1
:8089/websocket/
"
+
d
;
let
wss
=
new
WebSocket
(
web_ip
);
wss
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
src/main/resources/static/js/sjcx/gcjl.js
View file @
7c820595
...
...
@@ -470,7 +470,7 @@ $('[data-gallery=manual]').click(function (e) {
let
d
=
new
Date
().
getTime
();
let
web_ip
=
"
ws:/
localhost
:8089/websocket/
"
+
d
;
let
web_ip
=
"
ws:/
/127.0.0.1
:8089/websocket/
"
+
d
;
let
wss
=
new
WebSocket
(
web_ip
);
wss
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
src/main/resources/static/js/sjcx/sjcx.js
View file @
7c820595
...
...
@@ -746,7 +746,7 @@ $('[data-gallery=manual]').click(function (e) {
new
PhotoViewer
(
items
,
options
);
});
let
d
=
new
Date
().
getTime
();
let
web_ip
=
"
ws:/1
72.16.24.153
:8089/websocket/
"
+
d
;
let
web_ip
=
"
ws:/1
27.0.0.1
:8089/websocket/
"
+
d
;
let
wss
=
new
WebSocket
(
web_ip
);
wss
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
src/main/resources/static/js/sjfx/sjfx.js
View file @
7c820595
...
...
@@ -705,7 +705,7 @@ laydate.render({
}
});
function
websocket_s
(
d
)
{
let
web_ip
=
"
ws:/
localhost
:8089/websocket/
"
+
d
;
let
web_ip
=
"
ws:/
127.0.0.1
:8089/websocket/
"
+
d
;
wss
=
new
WebSocket
(
web_ip
);
wss
.
onopen
=
function
()
{
console
.
log
(
"
连接成功
"
);
...
...
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