forked from p71924506/SpringbootMybatis
Initial commit
This commit is contained in:
commit
408031eccb
|
@ -0,0 +1,29 @@
|
|||
HELP.md
|
||||
/target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenWrapperDownloader {
|
||||
|
||||
/**
|
||||
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
|
||||
*/
|
||||
private static final String DEFAULT_DOWNLOAD_URL =
|
||||
"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar";
|
||||
|
||||
/**
|
||||
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
|
||||
* use instead of the default one.
|
||||
*/
|
||||
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
|
||||
".mvn/wrapper/maven-wrapper.properties";
|
||||
|
||||
/**
|
||||
* Path where the maven-wrapper.jar will be saved to.
|
||||
*/
|
||||
private static final String MAVEN_WRAPPER_JAR_PATH =
|
||||
".mvn/wrapper/maven-wrapper.jar";
|
||||
|
||||
/**
|
||||
* Name of the property which should be used to override the default download url for the wrapper.
|
||||
*/
|
||||
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
|
||||
|
||||
public static void main(String args[]) {
|
||||
System.out.println("- Downloader started");
|
||||
File baseDirectory = new File(args[0]);
|
||||
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
|
||||
|
||||
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
||||
// wrapperUrl parameter.
|
||||
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
|
||||
String url = DEFAULT_DOWNLOAD_URL;
|
||||
if (mavenWrapperPropertyFile.exists()) {
|
||||
FileInputStream mavenWrapperPropertyFileInputStream = null;
|
||||
try {
|
||||
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
|
||||
Properties mavenWrapperProperties = new Properties();
|
||||
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
|
||||
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
|
||||
} catch (IOException e) {
|
||||
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
|
||||
} finally {
|
||||
try {
|
||||
if (mavenWrapperPropertyFileInputStream != null) {
|
||||
mavenWrapperPropertyFileInputStream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Ignore ...
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("- Downloading from: : " + url);
|
||||
|
||||
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
|
||||
if (!outputFile.getParentFile().exists()) {
|
||||
if (!outputFile.getParentFile().mkdirs()) {
|
||||
System.out.println(
|
||||
"- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
|
||||
}
|
||||
}
|
||||
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
|
||||
try {
|
||||
downloadFileFromURL(url, outputFile);
|
||||
System.out.println("Done");
|
||||
System.exit(0);
|
||||
} catch (Throwable e) {
|
||||
System.out.println("- Error downloading");
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
|
||||
URL website = new URL(urlString);
|
||||
ReadableByteChannel rbc;
|
||||
rbc = Channels.newChannel(website.openStream());
|
||||
FileOutputStream fos = new FileOutputStream(destination);
|
||||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
|
||||
fos.close();
|
||||
rbc.close();
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
|
|
@ -0,0 +1,286 @@
|
|||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven2 Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /etc/mavenrc ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
darwin=false;
|
||||
mingw=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -x "/usr/libexec/java_home" ]; then
|
||||
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||
else
|
||||
export JAVA_HOME="/Library/Java/Home"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if [ -r /etc/gentoo-release ] ; then
|
||||
JAVA_HOME=`java-config --jre-home`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
M2_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||
# TODO classpath?
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="`which javac`"
|
||||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||
if $darwin ; then
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||
else
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
fi
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="`which java`"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Path not specified to find_maven_basedir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
basedir="$1"
|
||||
wdir="$1"
|
||||
while [ "$wdir" != '/' ] ; do
|
||||
if [ -d "$wdir"/.mvn ] ; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||
if [ -d "${wdir}" ]; then
|
||||
wdir=`cd "$wdir/.."; pwd`
|
||||
fi
|
||||
# end of workaround
|
||||
done
|
||||
echo "${basedir}"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$(tr -s '\n' ' ' < "$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
##########################################################################################
|
||||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||
fi
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||
fi
|
||||
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
|
||||
while IFS="=" read key value; do
|
||||
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||
esac
|
||||
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Downloading from: $jarUrl"
|
||||
fi
|
||||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||
|
||||
if command -v wget > /dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found wget ... using wget"
|
||||
fi
|
||||
wget "$jarUrl" -O "$wrapperJarPath"
|
||||
elif command -v curl > /dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found curl ... using curl"
|
||||
fi
|
||||
curl -o "$wrapperJarPath" "$jarUrl"
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Falling back to using Java to download"
|
||||
fi
|
||||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||
if [ -e "$javaClass" ]; then
|
||||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
# Compiling the Java class
|
||||
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||
fi
|
||||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
# Running the downloader
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Running MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
##########################################################################################
|
||||
# End of extension
|
||||
##########################################################################################
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo $MAVEN_PROJECTBASEDIR
|
||||
fi
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||
fi
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
|
@ -0,0 +1,161 @@
|
|||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven2 Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM set title of command window
|
||||
title %0
|
||||
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
||||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
|
||||
FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
|
||||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||
)
|
||||
|
||||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
if exist %WRAPPER_JAR% (
|
||||
echo Found %WRAPPER_JAR%
|
||||
) else (
|
||||
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||
echo Downloading from: %DOWNLOAD_URL%
|
||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
|
||||
echo Finished downloading %WRAPPER_JAR%
|
||||
)
|
||||
@REM End of extension
|
||||
|
||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
||||
|
||||
exit /B %ERROR_CODE%
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.3.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>demo</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>demo</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.json-lib</groupId>
|
||||
<artifactId>json-lib</artifactId>
|
||||
<version>2.4</version>
|
||||
<classifier>jdk15</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-json-plugin</artifactId>
|
||||
<version>2.3.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.51</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- 这里我使用了devtool热部署技术,这样就不需要每次都重启服务!!-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- alibaba的druid数据库连接池 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>1.1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,34 @@
|
|||
package com.example.demo;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableTransactionManagement //开启事务管理
|
||||
@ComponentScan("com.example.demo")
|
||||
@MapperScan("com.example.demo.mapper")//与dao层的@Mapper二选一写上即可(主要作用是扫包)
|
||||
public class DemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(DemoApplication.class, args);
|
||||
}
|
||||
|
||||
|
||||
@Bean(destroyMethod = "close", initMethod = "init")
|
||||
@ConfigurationProperties(prefix = "spring.datasource")
|
||||
public DataSource druidDataSource() {
|
||||
DruidDataSource druidDataSource = new DruidDataSource();
|
||||
return druidDataSource;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
package com.example.demo.controller;
|
||||
|
||||
import com.example.demo.entity.User;
|
||||
import com.example.demo.service.UserService;
|
||||
import com.example.demo.util.Json;
|
||||
import com.example.demo.util.Tool;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static java.lang.System.out;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "/user")//设置访问改控制类的"别名"
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
/*
|
||||
**返回标准的Json格式数据其中包括(是否成功、状态码、消息、内容)
|
||||
* 该方法是由于公司很多童鞋写接口时没有一个标准的定义,天马行空的编写数据接口导致调用时效率极低,因此自己写了一个标准的
|
||||
* 接口调用方法,仅供大家参考
|
||||
* @param statu
|
||||
* @param code
|
||||
* @param message
|
||||
* @author lgf
|
||||
* */
|
||||
@RequestMapping("/getAllUser")
|
||||
@ResponseBody
|
||||
private void getAllUser(HttpServletResponse response)throws Exception {
|
||||
List<User> users = userService.getAllUser();
|
||||
if(users.isEmpty()){
|
||||
Json.toJson(new Tool(false,7000,"没有数据",null),response);
|
||||
return;
|
||||
}
|
||||
List<User> listuser = new ArrayList<User>();
|
||||
for (User entity : users) {
|
||||
User user = new User();
|
||||
user.setId(entity.getId());
|
||||
user.setName(entity.getName());
|
||||
user.setAge(entity.getAge());
|
||||
user.setSex(entity.getSex());
|
||||
listuser.add(entity);
|
||||
}
|
||||
Tool result = new Tool(true,200,"成功",listuser);
|
||||
Json.toJson(result,response);
|
||||
|
||||
}
|
||||
@RequestMapping("/find")
|
||||
@ResponseBody
|
||||
private User find() {
|
||||
User users = userService.getAllUserByName("小芳");
|
||||
return users;
|
||||
}
|
||||
@RequestMapping("/checkLogin")
|
||||
@ResponseBody
|
||||
private User checkLogin() {
|
||||
User users = new User();
|
||||
return users;
|
||||
}
|
||||
/*
|
||||
**登录调用方法跳转登录页面
|
||||
* @author lgf
|
||||
* */
|
||||
@RequestMapping("/login")
|
||||
private String index() {
|
||||
return "Login2.html";
|
||||
}
|
||||
/*
|
||||
**登录成功响应方法
|
||||
* @param message
|
||||
* @author lgf
|
||||
* */
|
||||
@RequestMapping(value="/success",method = {RequestMethod.POST, RequestMethod.GET})
|
||||
private String ok() {
|
||||
return "success";
|
||||
}
|
||||
/*
|
||||
**输入账号密码登录校验方法
|
||||
* @param message
|
||||
* @author lgf
|
||||
* */
|
||||
@RequestMapping(value="/loginPage",method = {RequestMethod.POST, RequestMethod.GET})
|
||||
private ModelAndView login(HttpServletRequest request, HttpSession session) {
|
||||
ModelAndView mav=new ModelAndView();
|
||||
//out.print("ajax进入后台!!");
|
||||
String name = request.getParameter("username");
|
||||
String id = request.getParameter("pwd");
|
||||
User tname = userService.loginPage(name,id);
|
||||
out.print(tname);
|
||||
if (tname == null) {
|
||||
mav.clear();
|
||||
mav.setViewName("Login2");
|
||||
return mav;
|
||||
} else {
|
||||
session.setAttribute("tname", tname.getName());
|
||||
out.print(tname.getName());
|
||||
//验证通过跳转首页
|
||||
mav.setViewName("homePage");
|
||||
return mav;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.example.demo.entity;
|
||||
|
||||
public class User {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String sex;
|
||||
private String age ;
|
||||
// private String memo;
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(String age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
/* public String getMemo() {
|
||||
return memo;
|
||||
}
|
||||
|
||||
public void setMemo(String memo) {
|
||||
this.memo = memo;
|
||||
}*/
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.demo.mapper;
|
||||
|
||||
import com.example.demo.entity.User;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
//@Mapper //声明是一个Mapper,与springbootApplication中的@MapperScan二选一写上即可
|
||||
@Repository
|
||||
public interface UserMapper {
|
||||
|
||||
List<User> getAllUser();
|
||||
@Select("select name,id from user where name=#{name}")
|
||||
User getAllUserByName(@Param("name") String name);
|
||||
User loginPage(String name,String id);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.example.demo.service;
|
||||
|
||||
import com.example.demo.entity.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserService {
|
||||
List<User> getAllUser();
|
||||
User getAllUserByName(String name);
|
||||
User loginPage(String name,String id);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.example.demo.service.impl;
|
||||
|
||||
import com.example.demo.entity.User;
|
||||
import com.example.demo.mapper.UserMapper;
|
||||
import com.example.demo.service.UserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service(value = "userService")
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
@Resource
|
||||
private UserMapper userMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<User> getAllUser() {
|
||||
return userMapper.getAllUser();
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getAllUserByName(String name) {
|
||||
return userMapper.getAllUserByName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User loginPage(String name, String id) {
|
||||
return userMapper.loginPage(name,id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.example.demo.util;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
public class Json {
|
||||
/*
|
||||
**返回标准的Json格式数据其中包括(是否成功、状态码、消息、内容)
|
||||
* @param statu
|
||||
* @param code
|
||||
* @param message
|
||||
* @author lgf
|
||||
* */
|
||||
public static void toJson(Tool result, HttpServletResponse response)throws Exception{
|
||||
response.setContentType("text/json");
|
||||
response.setHeader("Cache-Control","no-cache");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
PrintWriter writer = response.getWriter();
|
||||
|
||||
String json = JSONObject.toJSONString(result,
|
||||
SerializerFeature.WriteMapNullValue,
|
||||
SerializerFeature.WriteNullNumberAsZero,
|
||||
SerializerFeature.WriteNullListAsEmpty,
|
||||
SerializerFeature.WriteNullStringAsEmpty,
|
||||
SerializerFeature.WriteNullBooleanAsFalse,
|
||||
SerializerFeature.DisableCircularReferenceDetect);
|
||||
writer.write(json);
|
||||
writer.close();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.example.demo.util;
|
||||
|
||||
public class Tool {
|
||||
private Integer code;//状态码
|
||||
private Boolean isSuccess;//是否成功/状态
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public Boolean getSuccess() {
|
||||
return isSuccess;
|
||||
}
|
||||
|
||||
public void setSuccess(Boolean success) {
|
||||
isSuccess = success;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Object getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(Object result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
private String message;//消息
|
||||
private Object result;//数据对象
|
||||
/*
|
||||
* 构造函数*/
|
||||
public Tool(){
|
||||
super();
|
||||
}
|
||||
/**
|
||||
*返回标准的Json格式数据其中包括(是否成功、状态码、消息、内容)
|
||||
* @param statu
|
||||
* @param code
|
||||
* @param message
|
||||
*/
|
||||
public Tool(Boolean success,Integer code,String message,Object result ){
|
||||
super();
|
||||
this.isSuccess=success;
|
||||
this.code=code;
|
||||
this.message=message;
|
||||
this.result=result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
#服务器端口和项目名称配置
|
||||
server:
|
||||
port: 8081
|
||||
#数据库配置
|
||||
spring:
|
||||
datasource:
|
||||
name: springboot
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf-8&userSSL=false&serverTimezone=GMT%2B8
|
||||
username: user
|
||||
password: l123456
|
||||
# 使用druid数据源
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
filters: stat
|
||||
maxActive: 20
|
||||
initialSize: 1
|
||||
maxWait: 60000
|
||||
minIdle: 1
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
validationQuery: select 'x'
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
poolPreparedStatements: true
|
||||
maxOpenPreparedStatements: 20
|
||||
# 这里我使用了devtool热部署技术,这样就不需要每次都重启服务!!-->
|
||||
debug: true
|
||||
spring:
|
||||
devtools:
|
||||
restart:
|
||||
enabled: true #设置开启热部署
|
||||
freemarker:
|
||||
cache: false #页面不加载缓存,修改即时生效
|
||||
#配置Mapper.xml映射文件
|
||||
mybatis:
|
||||
mapper-locations: classpath*:mybatis/mapper/*.xml
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
|
||||
<mapper namespace="com.example.demo.mapper.UserMapper">
|
||||
|
||||
<select id="getAllUser" resultType="com.example.demo.entity.User">
|
||||
SELECT * FROM user
|
||||
</select>
|
||||
<!-- <select id="getAllUserByName" parameterType="String" resultType="com.example.demo.entity.User">
|
||||
SELECT name,id FROM user where name=#{value}
|
||||
</select>-->
|
||||
<select id="loginPage" parameterType="String" resultType="com.example.demo.entity.User">
|
||||
SELECT name FROM user where name=#{0} and id=#{1}
|
||||
</select>
|
||||
</mapper>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,145 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script
|
||||
src="http://code.jquery.com/jquery-latest.js"></script>
|
||||
<meta charset="utf-8" />
|
||||
<title>用户登录系统</title><base target="_blank" />
|
||||
<style>
|
||||
*{
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
a{color:White}
|
||||
body{
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/grass.jpg) no-repeat center;
|
||||
font-size:13px;
|
||||
}
|
||||
img{
|
||||
border:0;
|
||||
}
|
||||
.lg{width:468px; height:468px; margin:100px auto; background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/login_bg.png) no-repeat;}
|
||||
.lg_top{ height:200px; width:468px;}
|
||||
.lg_main{width:400px; height:180px; margin:0 25px;}
|
||||
.lg_m_1{
|
||||
width:290px;
|
||||
height:100px;
|
||||
padding:60px 55px 20px 55px;
|
||||
}
|
||||
.ur{
|
||||
height:37px;
|
||||
border:0;
|
||||
color:#666;
|
||||
width:236px;
|
||||
margin:4px 28px;
|
||||
background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/user.png) no-repeat;
|
||||
padding-left:10px;
|
||||
font-size:16pt;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
}
|
||||
.pw{
|
||||
height:37px;
|
||||
border:0;
|
||||
color:#666;
|
||||
width:236px;
|
||||
margin:4px 28px;
|
||||
background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/password.png) no-repeat;
|
||||
padding-left:10px;
|
||||
font-size:16pt;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
}
|
||||
.bn{width:330px; height:72px; background:url(http://keleyi.com/keleyi/phtml/divcss/21/images/enter.png) no-repeat; border:0; display:block; font-size:18px; color:#FFF; font-family:Arial, Helvetica, sans-serif; font-weight:bolder;}
|
||||
.lg_foot{
|
||||
height:80px;
|
||||
width:330px;
|
||||
padding: 6px 68px 0 68px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="b">
|
||||
<div class="lg">
|
||||
<form action="#" method="POST">
|
||||
<div class="lg_top"></div>
|
||||
<div class="lg_main">
|
||||
<div class="lg_m_1">
|
||||
|
||||
<input name="username" id="username" class="ur" />
|
||||
<input name="password" id="password" type="password" class="pw" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg_foot">
|
||||
<input type="button" value="点这里登录" class="bn" id="bn" /></div>
|
||||
</form>
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
<p><a href="http://keleyi.com/">首页</a> <a href="http://keleyi.com/keleyi/phtml/">特效库</a> <a href="http://keleyi.com/a/bjae/6asac24d.htm">原文</a></p>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#bn").click(function(){
|
||||
var username=$("#username").val();
|
||||
var password=$("#password").val();
|
||||
console.log(username);
|
||||
console.log(password);
|
||||
var error="";
|
||||
if (username.length=="") {
|
||||
error+="用户名不能为空";
|
||||
error+="\n";
|
||||
|
||||
}
|
||||
if (password.length=="") {
|
||||
error+="密码不能为空";
|
||||
error+="\n";
|
||||
}
|
||||
if (error!="") {
|
||||
alert(error);
|
||||
}
|
||||
else{
|
||||
/* debugger */
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
/* dataType:'json', */
|
||||
dataType:'json',
|
||||
url:'http://localhost:8080/panhai/login',
|
||||
contentType:'application/json;charset=UTF-8',
|
||||
|
||||
data:JSON.stringify({"username":username,"password":password}),
|
||||
|
||||
success:function(data){//返回json结果
|
||||
|
||||
//username==data.username&&password==data.password
|
||||
if(username==data.username&&password==data.password){
|
||||
//alert("用户名密码错误");//JSON.stringify(data)
|
||||
window.location.href="success.html?username="+data.username;
|
||||
//data.username
|
||||
}
|
||||
|
||||
else {
|
||||
//debugger;
|
||||
alert("用户名密码,错误");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* console.log({"username":username,"password":password}); */
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</html>
|
|
@ -0,0 +1,268 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
|
||||
</head>
|
||||
<style>
|
||||
#title{
|
||||
border-left: 0.2em solid #00397c;
|
||||
font-family: "Microsoft YaHei", "Hiragino Sans GB", Arial-normal, "open sans", "Helvetica Neue", Helvetica, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: bold;color: #00397c;
|
||||
}
|
||||
ul li {list-style: none;display: inline-block;text-align: center;color: #FFFFFF;font-size: 16px;padding: 0; float:left;width:30%}
|
||||
#xsdlxx1,#xsdlxx {width: 100%;text-align: center;margin-top:0}
|
||||
u {text-decoration: none;}
|
||||
div ul li div u {font-size: 18px;}
|
||||
.data-info {font-size: 19px;font-weight: bold;}
|
||||
.p-title {color: #FFFFFF;font-size: 16px;font-weight: bold;padding: 1% 0px 1% 3%;}
|
||||
#card-infor {width: 100%;height: 90%;position: relative;}
|
||||
#card1,#card2,#card3 {width: 100%;height: 3%;border-radius: 10px;position: relative;margin: 7px auto;}
|
||||
#xsyc-data li,#tqyc-data li {width: 40%;}
|
||||
.warn {color: #fd4200;}
|
||||
a {text-decoration: none;color: #FFFFFF;font-size: 12px;}
|
||||
a:hover {cursor: pointer;}
|
||||
#lxgd tr td {color: #ff4301;}th {font-weight: normal;background-color: #0067b4;border-right: 1px solid #0067b4;color: #FFFFFF;width: 24%;}
|
||||
</style>
|
||||
<body style="width:100%;height:98%;background:#F0F0F0;">
|
||||
<div id="main" style="width:99%;height: 98%;position: absolute;top: 0%;left: 0%;">
|
||||
<div id="left-space" style="width:1%;height:100%;float: left;"></div>
|
||||
<div id="left" style="width:69%;height:100%;float: left;">
|
||||
<div id="left-one" style="width:100%;height:50%;float: right;background:white;">
|
||||
<div id="left-content" style="width:100%;height:10%;float: right;">
|
||||
<label id="title"> 汉东省</label>
|
||||
</div>
|
||||
<div id="left-content" style="width:100%;height:90%;float:left;background:white;">
|
||||
<div id="left-content1" style="float:left;width:20%;height:100%;">
|
||||
内容1
|
||||
</div>
|
||||
<div id="left-content2" style="position: relative;width:50%;height:100%;float:left;">
|
||||
内容2
|
||||
</div>
|
||||
<div id="left-content3" style="position: relative;width:30%;height:100%;float:left;">
|
||||
内容3
|
||||
</div>
|
||||
</div>
|
||||
<div if="right-space" style="width:100%;height:2%;float: right;background:#F0F0F0;"></div>
|
||||
</div>
|
||||
<div id="right-space" style="width:100%;height:2%;float: right;background:#F0F0F0;"></div>
|
||||
<div id="left-two" style="width:100%;height:48%;float: left;">
|
||||
<div id="left-content4" style="float:left;width:100%;height:5%;background:white;">
|
||||
<label id="title"> 彩票数据</label>
|
||||
</div>
|
||||
<div id="card-infor" style="float:left;width:40%;height:95%;background:white;">
|
||||
<div id="card1" style="float:left;width:100%;height:30%;background:#555DFD;">
|
||||
<p class="p-title">亏损信息</p>
|
||||
<div id="xsdlxx">
|
||||
<ul id="xsdlxx-data">
|
||||
<li>
|
||||
<div id="xs">
|
||||
<label id="xsl" class="data-info">3.83</label>
|
||||
<a href="#">%</a>
|
||||
<br> <u>亏损率</u>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="xs">
|
||||
<label id="gdl" class="data-info">0.91</label>
|
||||
<a href="#">亿元</a>
|
||||
<br> <u>购买数</u>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="xs">
|
||||
<label id="sdl" class="data-info">0.87</label>
|
||||
<a href="#">亿元</a>
|
||||
<br> <u>中奖数</u>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card2" style="float:left;width:100%;height:30%;background:#569FFE;">
|
||||
<p class="p-title">亏损数</p>
|
||||
<div id="xsyc">
|
||||
<ul id="xsyc-data">
|
||||
<li>
|
||||
<div id="xlycyc">
|
||||
<label id="xsl" class="data-info warn">3.83</label>
|
||||
<a href="#">数</a>
|
||||
<br> <u>异常</u>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="xlyczc">
|
||||
<label id="gdl" class="data-info">0.91</label>
|
||||
<a href="#">数</a>
|
||||
<br> <u>正常</u>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card2" style="float:left;width:100%;height:30%;background:#018963;">
|
||||
<p class="p-title">全省亏损数</p>
|
||||
<div id="tqyc">
|
||||
<ul id="tqyc-data">
|
||||
<li>
|
||||
<div id="tqycyc">
|
||||
<label id="xsl" class="data-info warn">3.83</label>
|
||||
<a href="#">数</a>
|
||||
<br> <u>异常</u>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="tqyczc">
|
||||
<label id="gdl" class="data-info">0.91</label>
|
||||
<a href="#">数</a>
|
||||
<br> <u>正常</u>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="left-xsEchart" style="position: relative;width:60%;height:95%;float:left;background:white;">
|
||||
内容2
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="right" style="width:29%;height:100%;float: right;background:red;">
|
||||
<div id="right-one" style="width:100%;height:50%;float:right;background:white;">
|
||||
<div id="right-content" style="float:left;width:100%;height:10%;">
|
||||
<label id="title"> 工单数据</label>
|
||||
</div>
|
||||
<div id="right-content1" style="float:left;width:100%;height:40%;background:white;">
|
||||
<table id="lxgd" style="background:#0067b4;height:12%;width:100%;align:center;font-size:12;font-weight: normal">
|
||||
<thead>
|
||||
<th>工单类型</th>
|
||||
<th>总数</th>
|
||||
<th>未处理</th>
|
||||
<th>处理率</th>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="right-content2" style="position: relative;width:100%;height:50%;float:left;background:white;">
|
||||
内容2
|
||||
</div>
|
||||
</div>
|
||||
<div if="right-space" style="width:100%;height:2%;float: right;background:#F0F0F0;"></div>
|
||||
<div if="right-two" style="width:100%;height:48%;float: right;background:white;">
|
||||
<div style="float:left;width:100%;height:10%;">
|
||||
<label id="title"> 指标数据</label>
|
||||
</div>
|
||||
<div id="right-gjzbEchart" style="float:left;width:100%;height:90%;">
|
||||
内容1
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../js/echarts.js"></script>
|
||||
<script src="../js/demo.js"></script>
|
||||
<script src="../js/gjzb.js"></script>
|
||||
<script src="../js/xjgds.js"></script>
|
||||
<script type="text/javascript">
|
||||
function newTab(text, url) {
|
||||
openPage({
|
||||
text: text,
|
||||
link: url,
|
||||
target: "tab"
|
||||
});
|
||||
window.location.reload(true);
|
||||
}
|
||||
var zx_Chart = echarts.init(document.getElementById("left-xsEchart"));
|
||||
option = {
|
||||
title : {
|
||||
text: ' 亏损率(%)'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data:['亏损率','亏损合格率','合格率']
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: true},
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
boundaryGap : false,
|
||||
data : ['周一','周二','周三','周四','周五','周六','周日']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
axisLabel : {
|
||||
formatter: '{value} °C'
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'亏损率',
|
||||
type:'line',
|
||||
data:[11, 11, 15, 13, 12, 13, 10],
|
||||
markPoint : {
|
||||
data : [
|
||||
{type : 'max', name: '最大值'},
|
||||
{type : 'min', name: '最小值'}
|
||||
]
|
||||
},
|
||||
markLine : {
|
||||
data : [
|
||||
{type : 'average', name: '平均值'}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
name:'合格率',
|
||||
type:'line',
|
||||
data:[1, -2, 2, 5, 3, 2, 0],
|
||||
markPoint : {
|
||||
data : [
|
||||
{name : '周最低', value : -2, xAxis: 1, yAxis: -1.5}
|
||||
]
|
||||
},
|
||||
markLine : {
|
||||
data : [
|
||||
{type : 'average', name : '平均值'}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
name:'合格率',
|
||||
type:'line',
|
||||
data:[3, -2, 5, 0, 6, 0, 4],
|
||||
markPoint : {
|
||||
data : [
|
||||
{name : '周最低', value : -2, xAxis: 1, yAxis: -1.5}
|
||||
]
|
||||
},
|
||||
markLine : {
|
||||
data : [
|
||||
{type : 'average', name : '平均值'}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
zx_Chart.setOption(option);
|
||||
</script>
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 284 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
Binary file not shown.
After Width: | Height: | Size: 912 B |
Binary file not shown.
After Width: | Height: | Size: 751 B |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,97 @@
|
|||
var gjzb=echarts.init(document.getElementById("right-gjzbEchart"));
|
||||
|
||||
|
||||
option = {
|
||||
color: [ '#0068b7', '#006699', '#4cabce', '#e5323e' ],//统计图颜色系列值
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
borderWidth: 0,
|
||||
x: 70,
|
||||
y: 10,
|
||||
top: 65,
|
||||
left: 45,
|
||||
right: 30,
|
||||
bottom: 70,
|
||||
//barWidth:1,
|
||||
textStyle: {
|
||||
color: "#fff"
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data:['蒸发量','降水量','平均温度']
|
||||
},
|
||||
toolbox: {
|
||||
show : false,
|
||||
feature : {
|
||||
mark : {show: false},
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType: {show: true, type: ['line','bar']},
|
||||
restore : {show: false},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
name : '降水量',
|
||||
axisLabel : {
|
||||
formatter: '{value}\r\nkW·h'
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'value',
|
||||
name : '降水率',
|
||||
axisLabel : {
|
||||
formatter: '{value}\r\n%'
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'蒸发量',
|
||||
type:'bar',
|
||||
data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]/*,
|
||||
barMaxWidth: 0,
|
||||
large: false,
|
||||
barMinHeight: 1,
|
||||
itemStyle: {color: "#e5323e",
|
||||
normal :{
|
||||
label: {
|
||||
show: true,
|
||||
distance: 0,
|
||||
fontWeight: 'bolder',
|
||||
position: 'top',
|
||||
color: '#0068b7',
|
||||
fontSize: 20,
|
||||
formatter: function(value, index) {
|
||||
return value.value+"%";
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
},
|
||||
{
|
||||
name:'降水量',
|
||||
type:'bar',
|
||||
//barWidth:0,
|
||||
data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
|
||||
},
|
||||
{
|
||||
name:'平均温度',
|
||||
type:'line',
|
||||
yAxisIndex: 1,
|
||||
data:[-4.0, 6.2, -3.3, 4.5, -9.3, 10.2, 20.3, 23.4, -23.0, 16.5, -12.0, 6.2]
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
gjzb.setOption(option);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,90 @@
|
|||
var xjgds1=echarts.init(document.getElementById("left-content1"));
|
||||
var xjgds2=echarts.init(document.getElementById("left-content3"));
|
||||
option = {
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient : 'vertical',
|
||||
x : 'left',
|
||||
data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
|
||||
},
|
||||
toolbox: {
|
||||
show : false,
|
||||
feature : {
|
||||
mark : {show: true},
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {
|
||||
show: true,
|
||||
type: ['pie', 'funnel'],
|
||||
option: {
|
||||
funnel: {
|
||||
x: '25%',
|
||||
width: '50%',
|
||||
funnelAlign: 'left',
|
||||
max: 1548
|
||||
}
|
||||
}
|
||||
},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
series : [
|
||||
{
|
||||
name:'访问来源',
|
||||
type:'pie',
|
||||
radius : '55%',
|
||||
center: ['50%', '60%'],
|
||||
data:[
|
||||
{value:335, name:'直接访问'},
|
||||
{value:310, name:'邮件营销'},
|
||||
{value:234, name:'联盟广告'},
|
||||
{value:135, name:'视频广告'},
|
||||
{value:1548, name:'搜索引擎'}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option1 = {
|
||||
color: ['#3398DB'],
|
||||
tooltip : {
|
||||
trigger: 'axis',
|
||||
axisPointer : { // 坐标轴指示器,坐标轴触发有效
|
||||
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '2%',
|
||||
bottom: '1%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ['Sat', 'Sun'],
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value'
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'直接访问',
|
||||
type:'bar',
|
||||
barWidth: '40%',
|
||||
data:[10, 52]
|
||||
}
|
||||
]
|
||||
};
|
||||
xjgds1.setOption(option1);
|
||||
xjgds2.setOption(option);
|
|
@ -0,0 +1,212 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>login</title>
|
||||
<style type="text/css">
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#wrap {
|
||||
height: 719px;
|
||||
width: 100;
|
||||
background-image: url(../images/login.jpg);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
position: relative;
|
||||
}
|
||||
#head {
|
||||
height: 80px;
|
||||
width: 100;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
#foot {
|
||||
width: 100;
|
||||
height: 126px;
|
||||
background-color: white;
|
||||
position: relative;
|
||||
}
|
||||
#wrap .logGet {
|
||||
height: 408px;
|
||||
width: 368px;
|
||||
position: absolute;
|
||||
background-color: #FFFFFF;
|
||||
top: 20%;
|
||||
right: 10%;
|
||||
}
|
||||
#submit{
|
||||
width: 100%;
|
||||
height: 45px;
|
||||
background-color: #ee7700;
|
||||
border: none;
|
||||
color: white;
|
||||
font-size: 18px;
|
||||
}
|
||||
.logGet .logD.logDtip .p1 {
|
||||
display: inline-block;
|
||||
font-size: 28px;
|
||||
margin-top: 30px;
|
||||
width: 86%;
|
||||
}
|
||||
#wrap .logGet .logD.logDtip {
|
||||
width: 86%;
|
||||
border-bottom: 1px solid #ee7700;
|
||||
margin-bottom: 60px;
|
||||
margin-top: 0px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
.logGet .lgD img {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 8px;
|
||||
}
|
||||
.logGet .lgD input {
|
||||
width: 100%;
|
||||
height: 42px;
|
||||
text-indent: 2.5rem;
|
||||
}
|
||||
#wrap .logGet .lgD {
|
||||
width: 86%;
|
||||
position: relative;
|
||||
margin-bottom: 30px;
|
||||
margin-top: 30px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
#wrap .logGet .logC {
|
||||
width: 86%;
|
||||
margin-top: 0px;
|
||||
margin-right: auto;
|
||||
margin-bottom: 0px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
font-family: 微软雅黑;
|
||||
font-size: 26px;
|
||||
color: black;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: 50%;
|
||||
left: 7%;
|
||||
transform: translate(-50%, -50%); /* 使用css3的transform来实现 */
|
||||
font-size: 36px;
|
||||
height: 40px;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
font-family: "宋体";
|
||||
color: black;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%); /* 使用css3的transform来实现 */
|
||||
height: 60px;
|
||||
width: 40%;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
|
||||
#foot .copyright .img {
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
position: relative;
|
||||
}
|
||||
.copyright .img .icon {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 22px;
|
||||
vertical-align: middle;
|
||||
background-image: url(%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6.png);
|
||||
background-repeat: no-repeat;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.copyright .img .icon1 {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 22px;
|
||||
vertical-align: middle;
|
||||
background-image: url(%E5%9C%B0%E5%9D%80.png);
|
||||
background-repeat: no-repeat;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.copyright .img .icon2 {
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: 22px;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
#foot .copyright p {
|
||||
height: 24px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="width: 100%;height: 100%">
|
||||
|
||||
<div class="header" id="head">
|
||||
<div class="title">娱乐管理系统</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wrap" id="wrap">
|
||||
<div class="logGet">
|
||||
<form action="./loginPage" method="post">
|
||||
<!-- 头部提示信息 -->
|
||||
<div class="logD logDtip">
|
||||
<p class="p1">登录</p>
|
||||
</div>
|
||||
<!-- 输入框 -->
|
||||
<div class="lgD">
|
||||
<img src="../images/name.png" width="20" height="20" alt=""/>
|
||||
<input type="text"
|
||||
placeholder="输入用户名" name="username"/>
|
||||
</div>
|
||||
<div class="lgD">
|
||||
<img src="../images/pwd.png" width="20" height="20" alt=""/>
|
||||
<input type="password"
|
||||
placeholder="输入用户密码" name="pwd"/>
|
||||
</div>
|
||||
<div class="logC">
|
||||
<input type="submit" id="submit"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer" id="foot">
|
||||
<div class="copyright">
|
||||
<p>Copyright © 2019 Qunar.com Inc. All Rights Reserved.</p>
|
||||
<div class="img">
|
||||
<i class="icon1"></i><span>联系地址:贵州省南明区</span>
|
||||
</div>
|
||||
|
||||
<div class="img">
|
||||
<i class="icon2"></i><span>联系电话:183****</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,85 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>layout 后台大布局 - Layui</title>
|
||||
<link rel="stylesheet" href="../css/layui.css">
|
||||
</head>
|
||||
<body class="layui-layout-body">
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
<div class="layui-header">
|
||||
<div class="layui-logo">layui 后台布局</div>
|
||||
<!-- 头部区域(可配合layui已有的水平导航) -->
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="layui-nav-item"><a href="">控制台</a></li>
|
||||
<li class="layui-nav-item"><a href="">商品管理</a></li>
|
||||
<li class="layui-nav-item"><a href="">用户</a></li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">其它系统</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="">邮件管理</a></dd>
|
||||
<dd><a href="">消息管理</a></dd>
|
||||
<dd><a href="">授权管理</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">
|
||||
<img src="http://t.cn/RCzsdCq" class="layui-nav-img">
|
||||
罗帅帅
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="">基本资料</a></dd>
|
||||
<dd><a href="">安全设置</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item"><a href="">退了</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="layui-side layui-bg-black">
|
||||
<div class="layui-side-scroll">
|
||||
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
|
||||
<ul class="layui-nav layui-nav-tree" lay-filter="test">
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
<a class="" href="javascript:;">所有商品</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;">列表一</a></dd>
|
||||
<dd><a href="javascript:;">列表二</a></dd>
|
||||
<dd><a href="javascript:;">列表三</a></dd>
|
||||
<dd><a href="">超链接</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">解决方案</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="javascript:;">列表一</a></dd>
|
||||
<dd><a href="javascript:;">列表二</a></dd>
|
||||
<dd><a href="">超链接</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item"><a href="">云市场</a></li>
|
||||
<li class="layui-nav-item"><a href="">发布商品</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-body">
|
||||
<!-- 内容主体区域 -->
|
||||
<iframe id="content" src="../html/index.html" frameborder="0" style="width: 100%; height: 100%;">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="../js/layui.js"></script>
|
||||
<script>
|
||||
//JavaScript代码区域
|
||||
layui.use('element', function(){
|
||||
var element = layui.element;
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script
|
||||
src="../js/jquery-2.1.1.min.js"></script>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
成功登陆
|
||||
|
||||
<marquee direction="left" behavior="alternate"><span id="name"></span>
|
||||
</marquee>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function(){
|
||||
|
||||
var url=window.location.href;
|
||||
var records=url.split("=");
|
||||
|
||||
//var obj=eval('(' + records[1] + ')');
|
||||
document.getElementById("name").innerHTML= records[1];;
|
||||
// $("#name").html(obj.username) ;
|
||||
|
||||
// console.log(records);
|
||||
// alert( records[1]);
|
||||
}
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<!-- <script type="text/javascript">
|
||||
$(function(){
|
||||
$.ajax({
|
||||
type:'GET',
|
||||
/* dataType:'json', */
|
||||
dataType:'text',
|
||||
url:'http://localhost:8080/panhai/d',
|
||||
contentType:'application/json;charset=UTF-8',
|
||||
|
||||
/* data:JSON.stringify({"username":username,"password":password}), */
|
||||
|
||||
success:function(data){//返回json结果
|
||||
|
||||
alert(data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
})
|
||||
</script> -->
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
package com.example.demo;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue