Commit 7c820595 authored by wangjinjing's avatar wangjinjing

去掉邮件

parent 1c9f34e4
...@@ -39,8 +39,6 @@ public class LoginController { ...@@ -39,8 +39,6 @@ public class LoginController {
@Resource @Resource
private UserService userService; private UserService userService;
@Resource
private MailService mailService;
@Resource @Resource
private TemplateEngine templateEngine; private TemplateEngine templateEngine;
...@@ -69,14 +67,6 @@ public class LoginController { ...@@ -69,14 +67,6 @@ public class LoginController {
public ResultBean login(User user, @RequestParam(value = "captcha", required = false) String captcha,HttpServletResponse response) { public ResultBean login(User user, @RequestParam(value = "captcha", required = false) String captcha,HttpServletResponse response) {
Subject subject = SecurityUtils.getSubject(); 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()); UsernamePasswordToken token = new UsernamePasswordToken(user.getUsername(), user.getPassword());
subject.login(token); subject.login(token);
......
package im.zhaojun.system.service; 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; //@Service
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
@Service
public class MailService { public class MailService {
@Value("${spring.mail.username}") // @Value("${spring.mail.username}")
private String form; // private String form;
@Resource // @Resource
private JavaMailSender mailSender; // private JavaMailSender mailSender;
public void sendHTMLMail(String to, String subject, String content) { // public void sendHTMLMail(String to, String subject, String content) {
MimeMessage mimeMessage = mailSender.createMimeMessage(); // MimeMessage mimeMessage = mailSender.createMimeMessage();
MimeMessageHelper helper; // MimeMessageHelper helper;
try { // try {
helper = new MimeMessageHelper(mimeMessage, true); // helper = new MimeMessageHelper(mimeMessage, true);
helper.setTo(to); // helper.setTo(to);
helper.setSubject(subject); // helper.setSubject(subject);
helper.setText(content, true); // helper.setText(content, true);
helper.setFrom(form); // helper.setFrom(form);
} catch (MessagingException e) { // } catch (MessagingException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
mailSender.send(mimeMessage); // mailSender.send(mimeMessage);
} // }
} }
...@@ -5,7 +5,8 @@ server.port=8082 ...@@ -5,7 +5,8 @@ server.port=8082
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=123456 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.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.filters= stat spring.datasource.filters= stat
...@@ -25,15 +26,12 @@ spring.datasource.maxOpenPreparedStatements= 20 ...@@ -25,15 +26,12 @@ spring.datasource.maxOpenPreparedStatements= 20
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8 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.redis.port=6379
spring.cache.type=redis spring.cache.type=redis
spring.cache.redis.time-to-live=600000 spring.cache.redis.time-to-live=600000
#spring.redis.password=123456 #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.configuration.map-underscore-to-camel-case=true
mybatis.mapper-locations=classpath:mapper/*.xml mybatis.mapper-locations=classpath:mapper/*.xml
......
...@@ -1249,7 +1249,7 @@ let arr_right_s = []; ...@@ -1249,7 +1249,7 @@ let arr_right_s = [];
//websocket连接 //websocket连接
let d = new Date().getTime(); 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); let wss = new WebSocket(web_ip);
wss.onopen = function () { wss.onopen = function () {
console.log("连接成功"); console.log("连接成功");
...@@ -1532,7 +1532,7 @@ $('[name="status"]').bootstrapSwitch({ ...@@ -1532,7 +1532,7 @@ $('[name="status"]').bootstrapSwitch({
//推送近5分钟数据 //推送近5分钟数据
function websocket_s(ds) { 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 = new WebSocket(web_ips);
ws_j5fz.onopen = function () { ws_j5fz.onopen = function () {
console.log("连接成功"); console.log("连接成功");
...@@ -1582,7 +1582,7 @@ function websocket_s(ds) { ...@@ -1582,7 +1582,7 @@ function websocket_s(ds) {
//推送自动规则 //推送自动规则
function websocket_gzdj(video_id, items, indexs_1) { 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); let ws_gzdj = new WebSocket(web_ips);
ws_gzdj.onopen = function () { ws_gzdj.onopen = function () {
console.log("连接成功"); console.log("连接成功");
......
...@@ -1249,7 +1249,7 @@ let arr_right_s = []; ...@@ -1249,7 +1249,7 @@ let arr_right_s = [];
//websocket连接 //websocket连接
let d = new Date().getTime(); 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); let wss = new WebSocket(web_ip);
wss.onopen = function () { wss.onopen = function () {
console.log("连接成功"); console.log("连接成功");
...@@ -1520,7 +1520,7 @@ $('[name="status"]').bootstrapSwitch({ ...@@ -1520,7 +1520,7 @@ $('[name="status"]').bootstrapSwitch({
//推送近5分钟数据 //推送近5分钟数据
function websocket_s(ds) { 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 = new WebSocket(web_ips);
ws_j5fz.onopen = function () { ws_j5fz.onopen = function () {
console.log("连接成功"); console.log("连接成功");
...@@ -1570,7 +1570,7 @@ function websocket_s(ds) { ...@@ -1570,7 +1570,7 @@ function websocket_s(ds) {
//推送自动规则 //推送自动规则
function websocket_gzdj(video_id, items, indexs_1) { 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); let ws_gzdj = new WebSocket(web_ips);
ws_gzdj.onopen = function () { ws_gzdj.onopen = function () {
console.log("连接成功"); console.log("连接成功");
......
...@@ -618,7 +618,7 @@ $('[data-gallery=manual]').click(function (e) { ...@@ -618,7 +618,7 @@ $('[data-gallery=manual]').click(function (e) {
new PhotoViewer(items, options); new PhotoViewer(items, options);
}); });
let d = new Date().getTime(); 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); let wss = new WebSocket(web_ip);
wss.onopen = function () { wss.onopen = function () {
console.log("连接成功"); console.log("连接成功");
......
...@@ -470,7 +470,7 @@ $('[data-gallery=manual]').click(function (e) { ...@@ -470,7 +470,7 @@ $('[data-gallery=manual]').click(function (e) {
let d = new Date().getTime(); 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); let wss = new WebSocket(web_ip);
wss.onopen = function () { wss.onopen = function () {
console.log("连接成功"); console.log("连接成功");
......
...@@ -746,7 +746,7 @@ $('[data-gallery=manual]').click(function (e) { ...@@ -746,7 +746,7 @@ $('[data-gallery=manual]').click(function (e) {
new PhotoViewer(items, options); new PhotoViewer(items, options);
}); });
let d = new Date().getTime(); let d = new Date().getTime();
let web_ip = "ws:/172.16.24.153:8089/websocket/" + d; let web_ip = "ws:/127.0.0.1:8089/websocket/" + d;
let wss = new WebSocket(web_ip); let wss = new WebSocket(web_ip);
wss.onopen = function () { wss.onopen = function () {
console.log("连接成功"); console.log("连接成功");
......
...@@ -705,7 +705,7 @@ laydate.render({ ...@@ -705,7 +705,7 @@ laydate.render({
} }
}); });
function websocket_s(d) { 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 = new WebSocket(web_ip);
wss.onopen = function () { wss.onopen = function () {
console.log("连接成功"); console.log("连接成功");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment