Commit bbcf2ffc authored by 陈立彬's avatar 陈立彬

初始化项目

parents
Pipeline #775 failed with stages
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="elleai" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="elleai" options="-parameters" />
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://maven.aliyun.com/repository/public" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MaterialThemeProjectNewConfig">
<option name="metadata">
<MTProjectMetadataState>
<option name="migrated" value="true" />
<option name="pristineConfig" value="false" />
<option name="userId" value="65979ab4:187f1b9bd3a:-8000" />
<option name="version" value="8.6.3" />
</MTProjectMetadataState>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="574a1768-7fe5-4933-b098-93fccbf8bd9d" name="更改" comment="更改" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
<option name="localRepository" value="D:\maven\repo" />
<option name="mavenHome" value="Use Maven wrapper" />
<option name="threads" value="2" />
<option name="useMavenConfig" value="true" />
<option name="userSettingsFile" value="D:\maven\conf\settings.xml" />
</MavenGeneralSettings>
</option>
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 4
}</component>
<component name="ProjectId" id="2mE49OlWeB44uOIKLiQwwMQrKYd" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false",
"git-widget-placeholder": "master",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "D:/chain_workspaces/elleai",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Facet",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.48216343",
"settings.editor.selected.configurable": "MavenSettings",
"vue.rearranger.settings.migration": "true",
"应用程序.CodeGen.executor": "Run"
}
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\workspace\elleai\src\test\java\cn\breeze\elleai\codegen" />
<recent name="D:\workspace\elleai" />
</key>
</component>
<component name="RunManager" selected="Application.CodeGen">
<configuration name="CodeGen" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="cn.breeze.elleai.codegen.CodeGen" />
<module name="elleai" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="cn.breeze.elleai.codegen.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="ElleaiApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="elleai" />
<option name="SPRING_BOOT_MAIN_CLASS" value="cn.breeze.elleai.ElleaiApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.18034.62" />
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-IU-241.18034.62" />
</set>
</attachedChunks>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="默认任务">
<changelist id="574a1768-7fe5-4933-b098-93fccbf8bd9d" name="更改" comment="" />
<created>1726628250923</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1726628250923</updated>
<workItem from="1726628251854" duration="244000" />
<workItem from="1726628516245" duration="1613000" />
<workItem from="1726630414943" duration="1614000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
</project>
\ No newline at end of file
# 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
#
# http://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.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
# Getting Started
### Reference Documentation
For further reference, please consider the following sections:
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/3.3.3/maven-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.3.3/maven-plugin/build-image.html)
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.3.3/reference/htmlsingle/index.html#web)
### Guides
The following guides illustrate how to use some features concretely:
* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/)
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
### Maven Parent overrides
Due to Maven's design, elements are inherited from the parent POM to the project POM.
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the parent.
To prevent this, the project POM contains empty overrides for these elements.
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.
This diff is collapsed.
<# : batch portion
@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 http://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 Apache Maven Wrapper startup batch script, version 3.3.2
@REM
@REM Optional ENV vars
@REM MVNW_REPOURL - repo url base for downloading maven distribution
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
@REM ----------------------------------------------------------------------------
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
@SET __MVNW_CMD__=
@SET __MVNW_ERROR__=
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
@SET PSModulePath=
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
)
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
@SET __MVNW_PSMODULEP_SAVE=
@SET __MVNW_ARG0_NAME__=
@SET MVNW_USERNAME=
@SET MVNW_PASSWORD=
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
@echo Cannot start maven from wrapper >&2 && exit /b 1
@GOTO :EOF
: end batch / begin powershell #>
$ErrorActionPreference = "Stop"
if ($env:MVNW_VERBOSE -eq "true") {
$VerbosePreference = "Continue"
}
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
if (!$distributionUrl) {
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
}
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
"maven-mvnd-*" {
$USE_MVND = $true
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
$MVN_CMD = "mvnd.cmd"
break
}
default {
$USE_MVND = $false
$MVN_CMD = $script -replace '^mvnw','mvn'
break
}
}
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
if ($env:MVNW_REPOURL) {
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
}
$distributionUrlName = $distributionUrl -replace '^.*/',''
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
if ($env:MAVEN_USER_HOME) {
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
}
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
exit $?
}
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
}
# prepare tmp dir
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
trap {
if ($TMP_DOWNLOAD_DIR.Exists) {
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
}
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
# Download and Install Apache Maven
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
Write-Verbose "Downloading from: $distributionUrl"
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
$webclient = New-Object System.Net.WebClient
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
# If specified, validate the SHA-256 sum of the Maven distribution zip file
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
if ($distributionSha256Sum) {
if ($USE_MVND) {
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
}
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
}
}
# unzip and move
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
try {
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
} catch {
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
Write-Error "fail to move MAVEN_HOME"
}
} finally {
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
<?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 https://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>3.3.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>cn.breeze</groupId>
<artifactId>elleai</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>elleai</name>
<description>elleai</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-spring-boot3-starter</artifactId>
<version>1.9.7</version>
</dependency>
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-codegen</artifactId>
<version>1.9.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
package cn.breeze.elleai;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ElleaiApplication {
public static void main(String[] args) {
SpringApplication.run(ElleaiApplication.class, args);
}
}
package cn.breeze.elleai.infra.entity;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.io.Serial;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 实体类。
*
* @author breeze
* @since 2024-09-18
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("auth_client_endpoint")
public class ClientEndpointEntity implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Id(keyType = KeyType.Auto)
private Long id;
/**
* 客户端应用ID
*/
private Long clientId;
/**
* 客户端入口
*/
private String endpoint;
/**
* 描述
*/
private String description;
/**
* 状态,0停用,1启用
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createAt;
/**
* 更新时间
*/
private LocalDateTime updateAt;
}
package cn.breeze.elleai.infra.entity;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.io.Serial;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 实体类。
*
* @author breeze
* @since 2024-09-18
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("auth_client")
public class ClientEntity implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Id(keyType = KeyType.Auto)
private Long id;
/**
* 租户ID
*/
private Long tenant;
/**
* 平台self自建,tiktok,wx_mp,wx_ma等等
*/
private String platform;
/**
* 应用编码
*/
private String appCode;
/**
* 应用秘钥
*/
private String appSecret;
/**
* 应用描述
*/
private String description;
/**
* 授权方式
*/
private String grantType;
/**
* 签名字符串
*/
private String secretKey;
/**
* 令牌过期时间,单位秒
*/
private Integer expiresIn;
/**
* 授权范围
*/
private String scope;
/**
* 是否启用自动注册用户,0停用,1启用
*/
private Integer autoRegister;
/**
* 状态,0停用,1启用
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createAt;
/**
* 修改时间
*/
private LocalDateTime updateAt;
}
package cn.breeze.elleai.infra.entity;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.io.Serial;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 实体类。
*
* @author breeze
* @since 2024-09-18
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("auth_client_sms")
public class ClientSmsEntity implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Id(keyType = KeyType.Auto)
private Long id;
/**
* 租户ID
*/
private Long tenant;
/**
* 访问秘钥
*/
private String ak;
/**
* 秘钥
*/
private String sk;
/**
* 区域
*/
private String region;
/**
* 接入点
*/
private String endpoint;
/**
* 签名
*/
private String signName;
/**
* 时间间隔
*/
private Integer interval;
/**
* 状态0停用,1启用
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createAt;
/**
* 修改时间
*/
private LocalDateTime updateAt;
}
package cn.breeze.elleai.infra.entity;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.io.Serial;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 实体类。
*
* @author breeze
* @since 2024-09-18
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("auth_client_sms_sense")
public class ClientSmsSenseEntity implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Id(keyType = KeyType.Auto)
private Long id;
/**
* 租户ID
*/
private Long tenant;
/**
* 场景
*/
private String sense;
/**
* 模板ID
*/
private String templateId;
/**
* 模板变量
*/
private String params;
/**
* 状态,0停用,1启用
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createAt;
/**
* 更新时间
*/
private LocalDateTime updateAt;
}
package cn.breeze.elleai.infra.entity;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.io.Serial;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 实体类。
*
* @author breeze
* @since 2024-09-18
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("auth_client_user")
public class ClientUserEntity implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
@Id(keyType = KeyType.Auto)
private Long id;
/**
* 应用ID
*/
private Long clientId;
/**
* 开放ID,自由平台或者外部第三方平台都有
*/
private String openId;
/**
* 用户名
*/
private String username;
/**
* 密码
*/
private String password;
/**
* 邮箱
*/
private String email;
/**
* 手机号码
*/
private String mobile;
/**
* 状态0停用,1启用
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createAt;
/**
* 修改时间
*/
private LocalDateTime updateAt;
}
package cn.breeze.elleai.infra.entity.table;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;
import java.io.Serial;
/**
* 表定义层。
*
* @author breeze
* @since 2024-09-18
*/
public class ClientEndpointTableDef extends TableDef {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
public static final ClientEndpointTableDef CLIENT_ENDPOINT_ENTITY = new ClientEndpointTableDef();
public final QueryColumn ID = new QueryColumn(this, "id");
/**
* 状态,0停用,1启用
*/
public final QueryColumn STATUS = new QueryColumn(this, "status");
/**
* 客户端应用ID
*/
public final QueryColumn CLIENT_ID = new QueryColumn(this, "client_id");
/**
* 创建时间
*/
public final QueryColumn CREATE_AT = new QueryColumn(this, "create_at");
/**
* 客户端入口
*/
public final QueryColumn ENDPOINT = new QueryColumn(this, "endpoint");
/**
* 更新时间
*/
public final QueryColumn UPDATE_AT = new QueryColumn(this, "update_at");
/**
* 描述
*/
public final QueryColumn DESCRIPTION = new QueryColumn(this, "description");
/**
* 所有字段。
*/
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
/**
* 默认字段,不包含逻辑删除或者 large 等字段。
*/
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, CLIENT_ID, ENDPOINT, DESCRIPTION, STATUS, CREATE_AT, UPDATE_AT};
public ClientEndpointTableDef() {
super("", "auth_client_endpoint");
}
private ClientEndpointTableDef(String schema, String name, String alisa) {
super(schema, name, alisa);
}
public ClientEndpointTableDef as(String alias) {
String key = getNameWithSchema() + "." + alias;
return getCache(key, k -> new ClientEndpointTableDef("", "auth_client_endpoint", alias));
}
}
package cn.breeze.elleai.infra.entity.table;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;
import java.io.Serial;
/**
* 表定义层。
*
* @author breeze
* @since 2024-09-18
*/
public class ClientSmsSenseTableDef extends TableDef {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
public static final ClientSmsSenseTableDef CLIENT_SMS_SENSE_ENTITY = new ClientSmsSenseTableDef();
public final QueryColumn ID = new QueryColumn(this, "id");
/**
* 场景
*/
public final QueryColumn SENSE = new QueryColumn(this, "sense");
/**
* 模板变量
*/
public final QueryColumn PARAMS = new QueryColumn(this, "params");
/**
* 状态,0停用,1启用
*/
public final QueryColumn STATUS = new QueryColumn(this, "status");
/**
* 租户ID
*/
public final QueryColumn TENANT = new QueryColumn(this, "tenant");
/**
* 创建时间
*/
public final QueryColumn CREATE_AT = new QueryColumn(this, "create_at");
/**
* 更新时间
*/
public final QueryColumn UPDATE_AT = new QueryColumn(this, "update_at");
/**
* 模板ID
*/
public final QueryColumn TEMPLATE_ID = new QueryColumn(this, "template_id");
/**
* 所有字段。
*/
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
/**
* 默认字段,不包含逻辑删除或者 large 等字段。
*/
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TENANT, SENSE, TEMPLATE_ID, PARAMS, STATUS, CREATE_AT, UPDATE_AT};
public ClientSmsSenseTableDef() {
super("", "auth_client_sms_sense");
}
private ClientSmsSenseTableDef(String schema, String name, String alisa) {
super(schema, name, alisa);
}
public ClientSmsSenseTableDef as(String alias) {
String key = getNameWithSchema() + "." + alias;
return getCache(key, k -> new ClientSmsSenseTableDef("", "auth_client_sms_sense", alias));
}
}
package cn.breeze.elleai.infra.entity.table;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;
import java.io.Serial;
/**
* 表定义层。
*
* @author breeze
* @since 2024-09-18
*/
public class ClientSmsTableDef extends TableDef {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
public static final ClientSmsTableDef CLIENT_SMS_ENTITY = new ClientSmsTableDef();
/**
* 访问秘钥
*/
public final QueryColumn AK = new QueryColumn(this, "ak");
public final QueryColumn ID = new QueryColumn(this, "id");
/**
* 秘钥
*/
public final QueryColumn SK = new QueryColumn(this, "sk");
/**
* 区域
*/
public final QueryColumn REGION = new QueryColumn(this, "region");
/**
* 状态0停用,1启用
*/
public final QueryColumn STATUS = new QueryColumn(this, "status");
/**
* 租户ID
*/
public final QueryColumn TENANT = new QueryColumn(this, "tenant");
/**
* 创建时间
*/
public final QueryColumn CREATE_AT = new QueryColumn(this, "create_at");
/**
* 接入点
*/
public final QueryColumn ENDPOINT = new QueryColumn(this, "endpoint");
/**
* 时间间隔
*/
public final QueryColumn INTERVAL = new QueryColumn(this, "interval");
/**
* 签名
*/
public final QueryColumn SIGN_NAME = new QueryColumn(this, "sign_name");
/**
* 修改时间
*/
public final QueryColumn UPDATE_AT = new QueryColumn(this, "update_at");
/**
* 所有字段。
*/
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
/**
* 默认字段,不包含逻辑删除或者 large 等字段。
*/
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TENANT, AK, SK, REGION, ENDPOINT, SIGN_NAME, INTERVAL, STATUS, CREATE_AT, UPDATE_AT};
public ClientSmsTableDef() {
super("", "auth_client_sms");
}
private ClientSmsTableDef(String schema, String name, String alisa) {
super(schema, name, alisa);
}
public ClientSmsTableDef as(String alias) {
String key = getNameWithSchema() + "." + alias;
return getCache(key, k -> new ClientSmsTableDef("", "auth_client_sms", alias));
}
}
package cn.breeze.elleai.infra.entity.table;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;
import java.io.Serial;
/**
* 表定义层。
*
* @author breeze
* @since 2024-09-18
*/
public class ClientTableDef extends TableDef {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
public static final ClientTableDef CLIENT_ENTITY = new ClientTableDef();
public final QueryColumn ID = new QueryColumn(this, "id");
/**
* 授权范围
*/
public final QueryColumn SCOPE = new QueryColumn(this, "scope");
/**
* 状态,0停用,1启用
*/
public final QueryColumn STATUS = new QueryColumn(this, "status");
/**
* 租户ID
*/
public final QueryColumn TENANT = new QueryColumn(this, "tenant");
/**
* 应用编码
*/
public final QueryColumn APP_CODE = new QueryColumn(this, "app_code");
/**
* 创建时间
*/
public final QueryColumn CREATE_AT = new QueryColumn(this, "create_at");
/**
* 平台self自建,tiktok,wx_mp,wx_ma等等
*/
public final QueryColumn PLATFORM = new QueryColumn(this, "platform");
/**
* 修改时间
*/
public final QueryColumn UPDATE_AT = new QueryColumn(this, "update_at");
/**
* 应用秘钥
*/
public final QueryColumn APP_SECRET = new QueryColumn(this, "app_secret");
/**
* 令牌过期时间,单位秒
*/
public final QueryColumn EXPIRES_IN = new QueryColumn(this, "expires_in");
/**
* 授权方式
*/
public final QueryColumn GRANT_TYPE = new QueryColumn(this, "grant_type");
/**
* 签名字符串
*/
public final QueryColumn SECRET_KEY = new QueryColumn(this, "secret_key");
/**
* 应用描述
*/
public final QueryColumn DESCRIPTION = new QueryColumn(this, "description");
/**
* 是否启用自动注册用户,0停用,1启用
*/
public final QueryColumn AUTO_REGISTER = new QueryColumn(this, "auto_register");
/**
* 所有字段。
*/
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
/**
* 默认字段,不包含逻辑删除或者 large 等字段。
*/
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TENANT, PLATFORM, APP_CODE, APP_SECRET, DESCRIPTION, GRANT_TYPE, SECRET_KEY, EXPIRES_IN, SCOPE, AUTO_REGISTER, STATUS, CREATE_AT, UPDATE_AT};
public ClientTableDef() {
super("", "auth_client");
}
private ClientTableDef(String schema, String name, String alisa) {
super(schema, name, alisa);
}
public ClientTableDef as(String alias) {
String key = getNameWithSchema() + "." + alias;
return getCache(key, k -> new ClientTableDef("", "auth_client", alias));
}
}
package cn.breeze.elleai.infra.entity.table;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;
import java.io.Serial;
/**
* 表定义层。
*
* @author breeze
* @since 2024-09-18
*/
public class ClientUserTableDef extends TableDef {
@Serial
private static final long serialVersionUID = 1L;
/**
*
*/
public static final ClientUserTableDef CLIENT_USER_ENTITY = new ClientUserTableDef();
public final QueryColumn ID = new QueryColumn(this, "id");
/**
* 邮箱
*/
public final QueryColumn EMAIL = new QueryColumn(this, "email");
/**
* 手机号码
*/
public final QueryColumn MOBILE = new QueryColumn(this, "mobile");
/**
* 开放ID,自由平台或者外部第三方平台都有
*/
public final QueryColumn OPEN_ID = new QueryColumn(this, "open_id");
/**
* 状态0停用,1启用
*/
public final QueryColumn STATUS = new QueryColumn(this, "status");
/**
* 应用ID
*/
public final QueryColumn CLIENT_ID = new QueryColumn(this, "client_id");
/**
* 创建时间
*/
public final QueryColumn CREATE_AT = new QueryColumn(this, "create_at");
/**
* 密码
*/
public final QueryColumn PASSWORD = new QueryColumn(this, "password");
/**
* 修改时间
*/
public final QueryColumn UPDATE_AT = new QueryColumn(this, "update_at");
/**
* 用户名
*/
public final QueryColumn USERNAME = new QueryColumn(this, "username");
/**
* 所有字段。
*/
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
/**
* 默认字段,不包含逻辑删除或者 large 等字段。
*/
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, CLIENT_ID, OPEN_ID, USERNAME, PASSWORD, EMAIL, MOBILE, STATUS, CREATE_AT, UPDATE_AT};
public ClientUserTableDef() {
super("", "auth_client_user");
}
private ClientUserTableDef(String schema, String name, String alisa) {
super(schema, name, alisa);
}
public ClientUserTableDef as(String alias) {
String key = getNameWithSchema() + "." + alias;
return getCache(key, k -> new ClientUserTableDef("", "auth_client_user", alias));
}
}
package cn.breeze.elleai.infra.mapper;
import org.apache.ibatis.annotations.Mapper;
import com.mybatisflex.core.BaseMapper;
import cn.breeze.elleai.infra.entity.ClientEndpointEntity;
/**
* 映射层。
*
* @author breeze
* @since 2024-09-18
*/
@Mapper
public interface ClientEndpointMapper extends BaseMapper<ClientEndpointEntity> {
}
package cn.breeze.elleai.infra.mapper;
import org.apache.ibatis.annotations.Mapper;
import com.mybatisflex.core.BaseMapper;
import cn.breeze.elleai.infra.entity.ClientEntity;
/**
* 映射层。
*
* @author breeze
* @since 2024-09-18
*/
@Mapper
public interface ClientMapper extends BaseMapper<ClientEntity> {
}
package cn.breeze.elleai.infra.mapper;
import org.apache.ibatis.annotations.Mapper;
import com.mybatisflex.core.BaseMapper;
import cn.breeze.elleai.infra.entity.ClientSmsEntity;
/**
* 映射层。
*
* @author breeze
* @since 2024-09-18
*/
@Mapper
public interface ClientSmsMapper extends BaseMapper<ClientSmsEntity> {
}
package cn.breeze.elleai.infra.mapper;
import org.apache.ibatis.annotations.Mapper;
import com.mybatisflex.core.BaseMapper;
import cn.breeze.elleai.infra.entity.ClientSmsSenseEntity;
/**
* 映射层。
*
* @author breeze
* @since 2024-09-18
*/
@Mapper
public interface ClientSmsSenseMapper extends BaseMapper<ClientSmsSenseEntity> {
}
package cn.breeze.elleai.infra.mapper;
import org.apache.ibatis.annotations.Mapper;
import com.mybatisflex.core.BaseMapper;
import cn.breeze.elleai.infra.entity.ClientUserEntity;
/**
* 映射层。
*
* @author breeze
* @since 2024-09-18
*/
@Mapper
public interface ClientUserMapper extends BaseMapper<ClientUserEntity> {
}
spring:
application:
name: elle-ai
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
default-property-inclusion: non_null
property-naming-strategy: SNAKE_CASE
---
spring:
config:
activate:
on-profile: dev
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.18.5.186:4306/elle_ai?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: future
password: future123456
data:
redis:
host: 172.18.5.187
port: 6379
password: future123456
database: 11
package cn.breeze.elleai.codegen;
import com.mybatisflex.codegen.Generator;
import com.mybatisflex.codegen.config.GlobalConfig;
import com.zaxxer.hikari.HikariDataSource;
/**
* 代码生成器
* 通过连接数据库,生成代码,只生成entity
*
*/
public class CodeGen {
public static void main(String[] args) {
//配置数据源
HikariDataSource dataSource = new HikariDataSource();
dataSource.setJdbcUrl("jdbc:mysql://172.18.5.186:4306/ellehuis?characterEncoding=utf-8&useSSL=false");
dataSource.setUsername("future");
dataSource.setPassword("future123456");
GlobalConfig globalConfig = createGlobalConfigUseStyle1();
Generator generator = new Generator(dataSource, globalConfig);
generator.generate();
}
public static GlobalConfig createGlobalConfigUseStyle1() {
//创建配置内容
GlobalConfig globalConfig = new GlobalConfig();
globalConfig.setAuthor("breeze");
//设置根包
globalConfig.setBasePackage("cn.breeze.elleai.infra");
//设置表前缀和只生成哪些表
globalConfig.setTablePrefix("auth_");
globalConfig.setGenerateTable("auth_*");
//设置生成 entity 并启用 Lombok
globalConfig.setEntityGenerateEnable(true);
globalConfig.setEntityWithLombok(true);
globalConfig.setEntityClassSuffix("Entity");
//设置项目的JDK版本,项目的JDK为14及以上时建议设置该项,小于14则可以不设置
globalConfig.setEntityJdkVersion(17);
globalConfig.getEntityConfig().setOverwriteEnable(true);
globalConfig.enableTableDef();
globalConfig.getTableDefConfig().setOverwriteEnable(true);
globalConfig.enableMapper();
globalConfig.getMapperConfig().setMapperAnnotation(true);
// globalConfig.getMapperConfig().setOverwriteEnable(true);
return globalConfig;
}
}
package cn.breeze.elleai.test;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ElleaiApplicationTests {
@Test
void contextLoads() {
}
}
spring:
application:
name: elle-ai
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
default-property-inclusion: non_null
property-naming-strategy: SNAKE_CASE
---
spring:
config:
activate:
on-profile: dev
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.18.5.186:4306/elle_ai?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
username: future
password: future123456
data:
redis:
host: 172.18.5.187
port: 6379
password: future123456
database: 11
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