mirror of https://github.com/jeecgboot/jeecg-boot
【springboot3分支 issues/7353】The bean 'dataSource', defined in class path resource #7353
parent
6d432bc186
commit
79f7134bd5
File diff suppressed because one or more lines are too long
|
@ -105,7 +105,7 @@ spring:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
|
|
|
@ -105,7 +105,7 @@ spring:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
|
|
|
@ -50,8 +50,8 @@ public class JeecgGatewayApplication implements CommandLineRunner {
|
||||||
* @param indexHtml
|
* @param indexHtml
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @Bean
|
@Bean
|
||||||
// public RouterFunction<ServerResponse> indexRouter(@Value("classpath:/META-INF/resources/doc.html") final org.springframework.core.io.Resource indexHtml) {
|
public RouterFunction<ServerResponse> indexRouter(@Value("classpath:/META-INF/resources/doc.html") final org.springframework.core.io.Resource indexHtml) {
|
||||||
// return route(GET("/"), request -> ok().contentType(MediaType.TEXT_HTML).syncBody(indexHtml));
|
return route(GET("/"), request -> ok().contentType(MediaType.TEXT_HTML).syncBody(indexHtml));
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ spring:
|
||||||
resource:
|
resource:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
|
mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
|
||||||
global-config:
|
global-config:
|
||||||
|
|
|
@ -521,7 +521,7 @@ spring:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||||
#mybatis plus 设置
|
#mybatis plus 设置
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
|
@ -978,7 +978,7 @@ spring:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
|
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
|
||||||
|
@ -1511,7 +1511,7 @@ spring:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||||
#mybatis plus 设置
|
#mybatis plus 设置
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
|
@ -1963,7 +1963,7 @@ spring:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
|
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
|
||||||
|
@ -2396,7 +2396,7 @@ spring:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
|
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
|
||||||
|
@ -2834,7 +2834,7 @@ spring:
|
||||||
static-locations: classpath:/static/,classpath:/public/
|
static-locations: classpath:/static/,classpath:/public/
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
- com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
- org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
|
mapper-locations: classpath*:org/jeecg/**/xml/*Mapper.xml
|
||||||
|
|
|
@ -15,7 +15,7 @@ spring:
|
||||||
main:
|
main:
|
||||||
allow-bean-definition-overriding: true
|
allow-bean-definition-overriding: true
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
datasource:
|
datasource:
|
||||||
dynamic:
|
dynamic:
|
||||||
seata: true # 开启对 seata的支持
|
seata: true # 开启对 seata的支持
|
||||||
|
|
|
@ -16,6 +16,8 @@ import com.xxl.job.core.biz.model.ReturnT;
|
||||||
import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
|
import com.xxl.job.core.enums.ExecutorBlockStrategyEnum;
|
||||||
import com.xxl.job.core.glue.GlueTypeEnum;
|
import com.xxl.job.core.glue.GlueTypeEnum;
|
||||||
import com.xxl.job.core.util.DateUtil;
|
import com.xxl.job.core.util.DateUtil;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@ -24,8 +26,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,15 +2,16 @@ package com.xxl.job.admin.controller.interceptor;
|
||||||
|
|
||||||
import com.xxl.job.admin.core.util.FtlUtil;
|
import com.xxl.job.admin.core.util.FtlUtil;
|
||||||
import com.xxl.job.admin.core.util.I18nUtil;
|
import com.xxl.job.admin.core.util.I18nUtil;
|
||||||
|
import jakarta.servlet.http.Cookie;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.servlet.AsyncHandlerInterceptor;
|
import org.springframework.web.servlet.AsyncHandlerInterceptor;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.servlet.http.Cookie;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* push cookies to model as cookieMap
|
* push cookies to model as cookieMap
|
||||||
*
|
*
|
||||||
|
@ -21,7 +22,7 @@ public class CookieInterceptor implements AsyncHandlerInterceptor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
|
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
|
||||||
ModelAndView modelAndView) throws Exception {
|
ModelAndView modelAndView) throws Exception {
|
||||||
|
|
||||||
// cookie
|
// cookie
|
||||||
if (modelAndView!=null && request.getCookies()!=null && request.getCookies().length>0) {
|
if (modelAndView!=null && request.getCookies()!=null && request.getCookies().length>0) {
|
||||||
|
|
|
@ -4,13 +4,14 @@ import com.xxl.job.admin.controller.annotation.PermissionLimit;
|
||||||
import com.xxl.job.admin.core.model.XxlJobUser;
|
import com.xxl.job.admin.core.model.XxlJobUser;
|
||||||
import com.xxl.job.admin.core.util.I18nUtil;
|
import com.xxl.job.admin.core.util.I18nUtil;
|
||||||
import com.xxl.job.admin.service.LoginService;
|
import com.xxl.job.admin.service.LoginService;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.method.HandlerMethod;
|
import org.springframework.web.method.HandlerMethod;
|
||||||
import org.springframework.web.servlet.AsyncHandlerInterceptor;
|
import org.springframework.web.servlet.AsyncHandlerInterceptor;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限拦截
|
* 权限拦截
|
||||||
|
@ -55,5 +56,23 @@ public class PermissionInterceptor implements AsyncHandlerInterceptor {
|
||||||
|
|
||||||
return true; // proceed with the next interceptor
|
return true; // proceed with the next interceptor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
* @param request request
|
||||||
|
* @param response response
|
||||||
|
* @param handler handler
|
||||||
|
* @param modelAndView modelAndView
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
|
||||||
|
// 此处数据是preHandle方法set的loginUser信息
|
||||||
|
Object loginIdentityKey = request.getAttribute("XXL_JOB_LOGIN_IDENTITY");
|
||||||
|
if (null != modelAndView && null != loginIdentityKey) {
|
||||||
|
modelAndView.addObject("XXL_JOB_LOGIN_IDENTITY", loginIdentityKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
<#-- login user -->
|
<#-- login user -->
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="javascript:" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
<a href="javascript:" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||||
${I18n.system_welcome} ${Request["XXL_JOB_LOGIN_IDENTITY"].username}
|
${I18n.system_welcome} ${XXL_JOB_LOGIN_IDENTITY.username}
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu" role="menu">
|
<ul class="dropdown-menu" role="menu">
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
<li class="nav-click <#if pageName == "index">active</#if>" ><a href="${request.contextPath}/"><i class="fa fa-circle-o text-aqua"></i><span>${I18n.job_dashboard_name}</span></a></li>
|
<li class="nav-click <#if pageName == "index">active</#if>" ><a href="${request.contextPath}/"><i class="fa fa-circle-o text-aqua"></i><span>${I18n.job_dashboard_name}</span></a></li>
|
||||||
<li class="nav-click <#if pageName == "jobinfo">active</#if>" ><a href="${request.contextPath}/jobinfo"><i class="fa fa-circle-o text-yellow"></i><span>${I18n.jobinfo_name}</span></a></li>
|
<li class="nav-click <#if pageName == "jobinfo">active</#if>" ><a href="${request.contextPath}/jobinfo"><i class="fa fa-circle-o text-yellow"></i><span>${I18n.jobinfo_name}</span></a></li>
|
||||||
<li class="nav-click <#if pageName == "joblog">active</#if>" ><a href="${request.contextPath}/joblog"><i class="fa fa-circle-o text-green"></i><span>${I18n.joblog_name}</span></a></li>
|
<li class="nav-click <#if pageName == "joblog">active</#if>" ><a href="${request.contextPath}/joblog"><i class="fa fa-circle-o text-green"></i><span>${I18n.joblog_name}</span></a></li>
|
||||||
<#if Request["XXL_JOB_LOGIN_IDENTITY"].role == 1>
|
<#if XXL_JOB_LOGIN_IDENTITY.role == 1>
|
||||||
<li class="nav-click <#if pageName == "jobgroup">active</#if>" ><a href="${request.contextPath}/jobgroup"><i class="fa fa-circle-o text-red"></i><span>${I18n.jobgroup_name}</span></a></li>
|
<li class="nav-click <#if pageName == "jobgroup">active</#if>" ><a href="${request.contextPath}/jobgroup"><i class="fa fa-circle-o text-red"></i><span>${I18n.jobgroup_name}</span></a></li>
|
||||||
<li class="nav-click <#if pageName == "user">active</#if>" ><a href="${request.contextPath}/user"><i class="fa fa-circle-o text-purple"></i><span>${I18n.user_manage}</span></a></li>
|
<li class="nav-click <#if pageName == "user">active</#if>" ><a href="${request.contextPath}/user"><i class="fa fa-circle-o text-purple"></i><span>${I18n.user_manage}</span></a></li>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon">${I18n.jobinfo_field_jobgroup}</span>
|
<span class="input-group-addon">${I18n.jobinfo_field_jobgroup}</span>
|
||||||
<select class="form-control" id="jobGroup" paramVal="<#if jobInfo?exists>${jobInfo.jobGroup}</#if>" >
|
<select class="form-control" id="jobGroup" paramVal="<#if jobInfo?exists>${jobInfo.jobGroup}</#if>" >
|
||||||
<#if Request["XXL_JOB_LOGIN_IDENTITY"].role == 1>
|
<#if XXL_JOB_LOGIN_IDENTITY.role == 1>
|
||||||
<option value="0" >${I18n.system_all}</option> <#-- 仅管理员支持查询全部;普通用户仅支持查询有权限的 jobGroup -->
|
<option value="0" >${I18n.system_all}</option> <#-- 仅管理员支持查询全部;普通用户仅支持查询有权限的 jobGroup -->
|
||||||
</#if>
|
</#if>
|
||||||
<#list JobGroupList as group>
|
<#list JobGroupList as group>
|
||||||
|
|
Loading…
Reference in New Issue