com.easycode8.datasource.dynamic.web.DynamicDataSourceController Maven / Gradle / Ivy
The newest version!
package com.easycode8.datasource.dynamic.web;
import com.easycode8.datasource.dynamic.core.DataSourceInfo;
import com.easycode8.datasource.dynamic.core.DynamicDataSourceManager;
import com.easycode8.datasource.dynamic.core.util.SpringExceptionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping("/")
public class DynamicDataSourceController {
@Autowired
private DynamicDataSourceManager dynamicDataSourceManager;
@GetMapping("/dynamic-datasource-ui/list")
public ResponseEntity