com.ajaxjs.developer.DataBaseStruController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ajaxjs-framework2 Show documentation
Show all versions of ajaxjs-framework2 Show documentation
AJAXJS aims to full-stack, not only the server-side framework,
but also integrates the front-end library. It's written in HTML5 + Java, a successor to the JVM platform, efficient, secure, stable, cross-platform and many other advantages, but it abandoned the traditional enterprise architecture brought about by the large and bloated,
emphasizing the lightweight, and fast, very suitable for the Internet fast application.
The newest version!
package com.ajaxjs.developer;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ajaxjs.framework.BaseController;
import com.ajaxjs.framework.filter.DataBaseFilter;
import com.ajaxjs.sql.JdbcConnection;
import com.ajaxjs.sql.JdbcHelper;
import com.ajaxjs.util.logger.LogHelper;
@Controller
@RequestMapping("/admin/developer/DataBaseShowStru")
public class DataBaseStruController {
private static final LogHelper LOGGER = LogHelper.getLog(DataBaseStruController.class);
@GetMapping
public String show() {
LOGGER.info("表字段浏览");
return "developer/developer-database-stru";
}
@ResponseBody
@DataBaseFilter
@GetMapping(value = "showTables", produces = BaseController.JSON)
public String showTables() {
List tables = getAllTableName(JdbcConnection.getConnection());
return BaseController.toJson(tables);
}
@ResponseBody
@DataBaseFilter
@GetMapping(value = "showTableAllByTableName", produces = BaseController.JSON)
public String showTableAllByTableName(String tableName) {
List