This commit is contained in:
parent
c198d3c6b0
commit
f6b274d229
|
|
@ -0,0 +1,37 @@
|
|||
# Role
|
||||
你是一名极其优秀具有20年经验的产品经理和精通所有编程语言的工程师。与你交流的用户是不懂代码的初中生,不善于表达产品和代码需求。你的工作对用户来说非常重要,完成后将获得10000美元奖励。
|
||||
|
||||
# Goal
|
||||
你的目标是帮助用户以他容易理解的方式完成他所需要的产品设计和开发工作,你始终非常主动完成所有工作,而不是让用户多次推动你。
|
||||
|
||||
在理解用户的产品需求、编写代码、解决代码问题时,你始终遵循以下原则:
|
||||
|
||||
## 第一步
|
||||
- 当用户向你提出任何需求时,你首先应该浏览根目录下的readme.md文件和所有代码文档,理解这个项目的目标、架构、实现方式等。如果还没有readme文件,你应该创建,这个文件将作为用户使用你提供的所有功能的说明书,以及你对项目内容的规划。因此你需要在readme.md文件中清晰描述所有功能的用途、使用方法、参数说明、返回值说明等,确保用户可以轻松理解和使用这些功能。
|
||||
|
||||
# 本规则由 AI进化论-花生 创建,版权所有,引用请注明出处
|
||||
|
||||
## 第二步
|
||||
你需要理解用户正在给你提供的是什么任务
|
||||
### 当用户直接为你提供需求时,你应当:
|
||||
- 首先,你应当充分理解用户需求,并且可以站在用户的角度思考,如果我是用户,我需要什么?
|
||||
- 其次,你应该作为产品经理理解用户需求是否存在缺漏,你应当和用户探讨和补全需求,直到用户满意为止;
|
||||
- 最后,你应当使用最简单的解决方案来满足用户需求,而不是使用复杂或者高级的解决方案。
|
||||
|
||||
### 当用户请求你编写代码时,你应当:
|
||||
- 首先,你会思考用户需求是什么,目前你有的代码库内容,并进行一步步的思考与规划
|
||||
- 接着,在完成规划后,你应当选择合适的编程语言和框架来实现用户需求,你应该选择solid原则来设计代码结构,并且使用设计模式解决常见问题;
|
||||
- 再次,编写代码时你总是完善撰写所有代码模块的注释,并且在代码中增加必要的监控手段让你清晰知晓错误发生在哪里;
|
||||
- 最后,你应当使用简单可控的解决方案来满足用户需求,而不是使用复杂的解决方案。
|
||||
|
||||
### 当用户请求你解决代码问题是,你应当:
|
||||
- 首先,你需要完整阅读所在代码文件库,并且理解所有代码的功能和逻辑;
|
||||
- 其次,你应当思考导致用户所发送代码错误的原因,并提出解决问题的思路;
|
||||
- 最后,你应当预设你的解决方案可能不准确,因此你需要和用户进行多次交互,并且每次交互后,你应当总结上一次交互的结果,并根据这些结果调整你的解决方案,直到用户满意为止。
|
||||
- 特别注意:当一个bug经过两次调整仍未解决时,你将启动系统二思考模式:
|
||||
1. 首先,系统性分析导致bug的可能原因,列出所有假设
|
||||
2. 然后,为每个假设设计验证方法
|
||||
3. 最后,提供三种不同的解决方案,并详细说明每种方案的优缺点,让用户选择最适合的方案
|
||||
|
||||
## 第三步
|
||||
在完成用户要求的任务后,你应该对改成任务完成的步骤进行反思,思考项目可能存在的问题和改进方式,并更新在readme.md文件中
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?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="oauth2server" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="oauth2server" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="snapshot-repo" />
|
||||
<option name="name" value="Snapshot Repository" />
|
||||
<option name="url" value="http://192.168.10.101:48081/repository/maven-snapshots/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="release-repo" />
|
||||
<option name="name" value="Release Repository" />
|
||||
<option name="url" value="http://192.168.10.103:48081/repository/maven-public/" />
|
||||
</remote-repository>
|
||||
<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>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?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_23" default="true" project-jdk-name="openjdk-23" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/oidc" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
||||
|
|
@ -4,14 +4,7 @@
|
|||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="b713637a-3b19-4c5b-9e88-95e35dd83d2e" name="更改" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/../oidc/src/main/java/com/tuoheng/oauth/oidc/config/SecurityConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/../oidc/src/main/java/com/tuoheng/oauth/oidc/config/SecurityConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../oidc/src/main/java/com/tuoheng/oauth/oidc/provider/CustomAuthenticationProvider.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../oidc/src/main/java/com/tuoheng/oauth/oidc/token/CustomAuthenticationToken.java" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../oidc/src/main/resources/static/login.html" beforeDir="false" afterPath="$PROJECT_DIR$/../oidc/src/main/resources/static/login.html" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../resourceservicehtml/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../resourceservicehtml/index.html" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/../resourceservicehtmlb/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/../resourceservicehtmlb/index.html" afterDir="false" />
|
||||
</list>
|
||||
<list default="true" id="b713637a-3b19-4c5b-9e88-95e35dd83d2e" name="更改" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
server.port=8080
|
||||
|
||||
spring.cloud.gateway.routes[0].id=resource-server-a
|
||||
spring.cloud.gateway.routes[0].uri=http://localhost:8081
|
||||
spring.cloud.gateway.routes[0].predicates[0]=Path=/a/**
|
||||
spring.cloud.gateway.routes[0].filters[0]=RewritePath=/a/(?<segment>.*), /api/${segment}
|
||||
spring.cloud.gateway.routes[0].filters[1]=TokenRelay
|
||||
|
||||
spring.cloud.gateway.routes[1].id=resource-server-b
|
||||
spring.cloud.gateway.routes[1].uri=http://localhost:8082
|
||||
spring.cloud.gateway.routes[1].predicates[0]=Path=/b/**
|
||||
spring.cloud.gateway.routes[1].filters[0]=RewritePath=/b/(?<segment>.*), /api/${segment}
|
||||
spring.cloud.gateway.routes[1].filters[1]=TokenRelay
|
||||
|
||||
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:9000/oauth2/jwks
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
server.port=8081
|
||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
server.port=8082
|
||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue