Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

221203 #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified devTest/.gradle/7.5.1/checksums/checksums.lock
Binary file not shown.
Binary file modified devTest/.gradle/7.5.1/checksums/md5-checksums.bin
Binary file not shown.
Binary file modified devTest/.gradle/7.5.1/checksums/sha1-checksums.bin
Binary file not shown.
Binary file modified devTest/.gradle/7.5.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified devTest/.gradle/7.5.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified devTest/.gradle/7.5.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified devTest/.gradle/7.5.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified devTest/.gradle/7.5.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified devTest/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified devTest/.gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file modified devTest/.gradle/file-system.probe
Binary file not shown.
1 change: 1 addition & 0 deletions devTest/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions devTest/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions devTest/.idea/libraries/Gradle__io_jsonwebtoken_jjwt_0_9_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions devTest/.idea/libraries/Gradle__javax_xml_bind_jaxb_api_2_3_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions devTest/.idea/modules/devTest.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions devTest/.idea/modules/devTest.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 47 additions & 40 deletions devTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ repositories {
}

dependencies {
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
Expand All @@ -31,50 +32,56 @@ dependencies {
runtimeOnly 'com.oracle.database.jdbc:ojdbc8'
developmentOnly("org.springframework.boot:spring-boot-devtools")
implementation 'org.springframework.boot:spring-boot-starter-aop'
}

//compile file()

def frontendDir = "$projectDir/src/main/test_dev"
implementation 'org.springframework.boot:spring-boot-starter-security'
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
implementation 'javax.xml.bind:jaxb-api:2.3.1'
// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt
implementation 'io.jsonwebtoken:jjwt:0.9.1'

sourceSets {
main {
resources { srcDirs = ["$projectDir/src/main/resources"]
}
}
}

processResources { dependsOn "copyReactBuildFiles" }

task installReact(type: Exec) {
workingDir "$frontendDir"
inputs.dir "$frontendDir"
group = BasePlugin.BUILD_GROUP
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine "npm.cmd", "audit", "fix"
commandLine 'npm.cmd', 'install' }
else {
commandLine "npm", "audit", "fix" commandLine 'npm', 'install'
}
}

task buildReact(type: Exec) {
dependsOn "installReact"
workingDir "$frontendDir"
inputs.dir "$frontendDir"
group = BasePlugin.BUILD_GROUP
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine "npm.cmd", "run-script", "build"
} else {
commandLine "npm", "run-script", "build"
}
}
//compile file()

task copyReactBuildFiles(type: Copy) {
dependsOn "buildReact"
from "$frontendDir/build"
into "$projectDir/src/main/resources/static"
}
//def frontendDir = "$projectDir/src/main/test_dev"
//
//sourceSets {
// main {
// resources { srcDirs = ["$projectDir/src/main/resources"]
// }
// }
//}
//
//processResources { dependsOn "copyReactBuildFiles" }
//
//task installReact(type: Exec) {
// workingDir "$frontendDir"
// inputs.dir "$frontendDir"
// group = BasePlugin.BUILD_GROUP
// if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
// commandLine "npm.cmd", "audit", "fix"
// commandLine 'npm.cmd', 'install' }
// else {
// commandLine "npm", "audit", "fix" commandLine 'npm', 'install'
// }
//}
//
//task buildReact(type: Exec) {
// dependsOn "installReact"
// workingDir "$frontendDir"
// inputs.dir "$frontendDir"
// group = BasePlugin.BUILD_GROUP
// if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
// commandLine "npm.cmd", "run-script", "build"
// } else {
// commandLine "npm", "run-script", "build"
// }
//}
//
//task copyReactBuildFiles(type: Copy) {
// dependsOn "buildReact"
// from "$frontendDir/build"
// into "$projectDir/src/main/resources/static"
//}


tasks.named('test') {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 5 additions & 2 deletions devTest/build/resources/main/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ spring.datasource.password=991224
#DBCP Support
spring.datasource.hikari.maximum-pool-size=2


spring.devtools.livereload.enabled=true

#mybatis Support
#mybatis.mapper-locations=classpath:mybatis/*.xml
#mybatis.type-aliases-package=com.myapp.test.model
mybatis.mapper-locations=classpath:mybatis/*.xml
mybatis.type-aliases-package=com.devtest.devtest.model
27 changes: 27 additions & 0 deletions devTest/build/resources/main/mybatis/LoginMapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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.devtest.devtest.mapper.LoginMapper">
<select id="getUser" parameterType="String" resultType="User">
SELECT *
FROM COOL_3_MEAL_USER
WHERE email = #{email}
</select>

<select id="getNickname" parameterType="String" resultType="User">
SELECT *
FROM COOL_3_MEAL_USER
WHERE nickname = #{nickname}
</select>

<insert id="insertUser" keyProperty="uno">
<selectKey keyProperty="uno" resultType="int" order="BEFORE">
SELECT COALESCE(MAX(uno), 0) + 1 AS uno
FROM COOL_3_MEAL_USER
</selectKey>
INSERT INTO COOL_3_MEAL_USER (uno, email, pass, nickname, sex, birth, phone)
VALUES (#{uno}, #{email}, #{pass}, #{nickname}, #{sex}, #{birth}, #{phone})
</insert>

</mapper>
Loading