<tomcat-1>同时启动两个tomcat:端口冲突 && 展示不同名称

本文介绍如何在同一服务器上配置两个Tomcat实例以避免端口冲突,包括修改server.xml文件中的三个关键端口,并展示了如何设置不同的窗口标题以便于区分。
同一个服务器下不能同时启动两个tomcat。因为tomcat下的端口冲突,需要修改server.xml下面3个端口:
1.<Server port="8055" shutdown="SHUTDOWN">
2.<Connector port="7001" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" urlEncoding="UTF-8" />
3.<Connector port="8099" protocol="AJP/1.3" redirectPort="8443" maxPostSize="0"/>

保证两个tomcat的这三个端口都不冲突就可以了。先记下,后面再分析不同端口的作用原理。
参考:
[url]http://www.blogjava.net/allen-zhe/archive/2007/01/15/93981.html[/url]
[url]http://blog.youkuaiyun.com/aesop_wubo/article/details/7617416[/url]


[b]------------------------------------------------------[/b]
同一个windows服务器下启动两个tomcat,tomcat窗口标题展示成不同名字以示区分:
:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
set _EXECJAVA=start "[color=red]Tomcat[/color]" %_RUNJAVA%
goto gotTitle


:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
if "%TITLE%" == "" set TITLE=[color=red]Tomcat[/color]
set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
goto gotTitle
[b]
修改红色部分[/b]
在 conf/server.xml 的 <Host> 标签内添加: XML <Context path="/ZY_23106122" docBase="D:\tomcat\apache-tomcat-10.1.46\webapps\ZY_23106122" reloadable="true" /> 重启Tomcat服务: Shell # 重启命令 .\bin\shutdown.bat .\bin\startup.bat 4️⃣ 验证欢迎文件配置 检查 WEB-INF/web.xml: XML <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> 5️⃣ 端口冲突检测 Shell # 检查8080端口占用 netstat -ano | findstr :8080 若被占用:修改 conf/server.xml 的 <Connector port="8080"> 为其他端口 6️⃣ 权限问题处理 Shell # 授予Tomcat目录完全控制权 icacls "D:\tomcat\apache-tomcat-10.1.46" /grant Everyone:(OI)(CI)F /T 🔧 快速测试命令 Shell # 创建测试文件 echo "<h1>TEST PAGE $(Get-Date)</h1>" > "D:\tomcat\apache-tomcat-10.1.46\webapps\ZY_23106122\index.html" # 访问测试(浏览器打开) start http://localhost:8080/ZY_23106122/ 若显示内容 → 配置成功 若仍404 → 检查 logs\localhost_*.log 错误日志 📚 相关问题 如何解决Tomcat 10对特殊字符路径的拦截? Windows系统下如何排查端口占用导致的Tomcat启动失败? Tomcat部署WAR文件后未自动解压该如何处理? Spring Boot应用在Tomcat中出现404错误应如何调试? 通过上述步骤,95%的Tomcat 404错误可解决。关键点:下划线路径配置和目录权限1。若问题持续,请提供 logs\catalina.out 日志片段进一步分析。 解决问题生成全部完整步骤
最新发布
10-25
<?xml version="1.0" encoding="UTF-8"?> <!-- 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. --> <!-- Note: A "Server" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/server.html --> -<Server shutdown="SHUTDOWN" port="8005"> <Listener className="org.apache.catalina.startup.VersionLoggerListener"/> <!-- Security listener. Documentation at /docs/config/listeners.html <Listener className="org.apache.catalina.security.SecurityListener" /> --> <!--APR library loader. Documentation at /docs/apr.html --> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/> <!-- Prevent memory leaks due to use of particular java/javax APIs--> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/> <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/> <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html --> -<GlobalNamingResources> <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users --> <Resource pathname="conf/tomcat-users.xml" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" description="User database that can be updated and saved" type="org.apache.catalina.UserDatabase" auth="Container" name="UserDatabase"/> </GlobalNamingResources> <!-- A "Service" is a collection of one or more "Connectors" that share a single "Container" Note: A "Service" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/service.html --> -<Service name="Catalina"> <!--The connectors can use a shared executor, you can define one or more named thread pools--> <!-- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4"/> --> <!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL/TLS HTTP/1.1 Connector on port 8080 --> <Connector port="8080" redirectPort="8443" connectionTimeout="20000" protocol="HTTP/1.1"/> <!-- A "Connector" using the shared thread pool--> <!-- <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> --> <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 This connector uses the NIO implementation. The default SSLImplementation will depend on the presence of the APR/native library and the useOpenSSL attribute of the AprLifecycleListener. Either JSSE or OpenSSL style configuration may be used regardless of the SSLImplementation selected. JSSE style configuration is used below. --> <!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true"> <SSLHostConfig> <Certificate certificateKeystoreFile="conf/localhost-rsa.jks" type="RSA" /> </SSLHostConfig> </Connector> --> <!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2 This connector uses the APR/native implementation which always uses OpenSSL for TLS. Either JSSE or OpenSSL style configuration may be used. OpenSSL style configuration is used below. --> <!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol" maxThreads="150" SSLEnabled="true" > <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> <SSLHostConfig> <Certificate certificateKeyFile="conf/localhost-rsa-key.pem" certificateFile="conf/localhost-rsa-cert.pem" certificateChainFile="conf/localhost-rsa-chain.pem" type="RSA" /> </SSLHostConfig> </Connector> --> <!-- Define an AJP 1.3 Connector on port 8009 --> <!-- <Connector protocol="AJP/1.3" address="::1" port="8009" redirectPort="8443" /> --> <!-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html --> <!-- You should set jvmRoute to support load-balancing via AJP ie : <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1"> --> -<Engine name="Catalina" defaultHost="localhost"> <!--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html (reference documentation) --> <!-- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> --> <!-- Use the LockOutRealm to prevent attempts to guess user passwords via a brute-force attack --> -<Realm className="org.apache.catalina.realm.LockOutRealm"> <!-- This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase". Any edits that are performed against this UserDatabase are immediately available for use by the Realm. --> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm> -<Host name="localhost" autoDeploy="true" unpackWARs="true" appBase="webapps"> <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> --> <!-- Access log processes all example. Documentation at: /docs/config/valve.html Note: The pattern used is equivalent to using pattern="common" --> <Valve className="org.apache.catalina.valves.AccessLogValve" pattern="%h %l %u %t "%r" %s %b" suffix=".txt" prefix="localhost_access_log" directory="logs"/> </Host> </Engine> </Service> </Server>https链接
06-27
server: port: 8080 # 指定服务端口为8080 spring: data: mongodb: uri: mongodb://192.168.1.88:27017/cobot datasource: url: jdbc:mysql://192.168.1.88:3307/zrzk-code-analysis?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # 替换为你的MySQL数据库地址和库名 username: root password: letmego driver-class-name: com.mysql.cj.jdbc.Driver mybatis: mapper-locations: classpath:mapper/*.xml <?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> <groupId>com.zrzk.security</groupId> <artifactId>Mongodb-MySQL</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <properties> <maven.compiler.source>21</maven.compiler.source> <maven.compiler.target>21</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <spring-boot.version>3.2.0</spring-boot.version> </properties> <dependencies> <!-- Spring Boot 核心 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- MongoDB 驱动 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> <version>3.5.6</version> </dependency> <!-- MySQL 驱动 + MyBatis --> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>3.0.5</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.33</version> </dependency> <!-- Lombok 简化实体类 --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.30</version> </dependency> <!-- Spring Boot 测试 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${spring-boot.version}</version> <configuration> <!-- <excludes>--> <!-- <exclude>--> <!-- <groupId>org.projectlombok</groupId>--> <!-- <artifactId>lombok</artifactId>--> <!-- </exclude>--> <!-- </excludes>--> </configuration> </plugin> </plugins> </build> </project> D:\graalvm-jdk-21.0.6+8.1\bin\java.exe -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2024.3.4.1\lib\idea_rt.jar=51961" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath D:\svn-workspace\Mongodb-MySQL\target\classes;D:\maven\maven-repository\org\springframework\boot\spring-boot-starter-web\3.2.0\spring-boot-starter-web-3.2.0.jar;D:\maven\maven-repository\org\springframework\boot\spring-boot-starter\3.2.0\spring-boot-starter-3.2.0.jar;D:\maven\maven-repository\org\springframework\boot\spring-boot\3.2.0\spring-boot-3.2.0.jar;D:\maven\maven-repository\org\springframework\boot\spring-boot-autoconfigure\3.2.0\spring-boot-autoconfigure-3.2.0.jar;D:\maven\maven-repository\org\springframework\boot\spring-boot-starter-logging\3.2.0\spring-boot-starter-logging-3.2.0.jar;D:\maven\maven-repository\ch\qos\logback\logback-classic\1.4.11\logback-classic-1.4.11.jar;D:\maven\maven-repository\ch\qos\logback\logback-core\1.4.11\logback-core-1.4.11.jar;D:\maven\maven-repository\org\apache\logging\log4j\log4j-to-slf4j\2.21.1\log4j-to-slf4j-2.21.1.jar;D:\maven\maven-repository\org\apache\logging\log4j\log4j-api\2.21.1\log4j-api-2.21.1.jar;D:\maven\maven-repository\org\slf4j\jul-to-slf4j\2.0.9\jul-to-slf4j-2.0.9.jar;D:\maven\maven-repository\jakarta\annotation\jakarta.annotation-api\2.1.1\jakarta.annotation-api-2.1.1.jar;D:\maven\maven-repository\org\yaml\snakeyaml\2.2\snakeyaml-2.2.jar;D:\maven\maven-repository\org\springframework\boot\spring-boot-starter-json\3.2.0\spring-boot-starter-json-3.2.0.jar;D:\maven\maven-repository\com\fasterxml\jackson\core\jackson-databind\2.15.3\jackson-databind-2.15.3.jar;D:\maven\maven-repository\com\fasterxml\jackson\core\jackson-annotations\2.15.3\jackson-annotations-2.15.3.jar;D:\maven\maven-repository\com\fasterxml\jackson\core\jackson-core\2.15.3\jackson-core-2.15.3.jar;D:\maven\maven-repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.15.3\jackson-datatype-jdk8-2.15.3.jar;D:\maven\maven-repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.15.3\jackson-datatype-jsr310-2.15.3.jar;D:\maven\maven-repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.15.3\jackson-module-parameter-names-2.15.3.jar;D:\maven\maven-repository\org\springframework\boot\spring-boot-starter-tomcat\3.2.0\spring-boot-starter-tomcat-3.2.0.jar;D:\maven\maven-repository\org\apache\tomcat\embed\tomcat-embed-core\10.1.16\tomcat-embed-core-10.1.16.jar;D:\maven\maven-repository\org\apache\tomcat\embed\tomcat-embed-el\10.1.16\tomcat-embed-el-10.1.16.jar;D:\maven\maven-repository\org\apache\tomcat\embed\tomcat-embed-websocket\10.1.16\tomcat-embed-websocket-10.1.16.jar;D:\maven\maven-repository\org\springframework\spring-web\6.1.1\spring-web-6.1.1.jar;D:\maven\maven-repository\org\springframework\spring-beans\6.1.1\spring-beans-6.1.1.jar;D:\maven\maven-repository\io\micrometer\micrometer-observation\1.12.0\micrometer-observation-1.12.0.jar;D:\maven\maven-repository\io\micrometer\micrometer-commons\1.12.0\micrometer-commons-1.12.0.jar;D:\maven\maven-repository\org\springframework\spring-webmvc\6.1.1\spring-webmvc-6.1.1.jar;D:\maven\maven-repository\org\springframework\spring-aop\6.1.1\spring-aop-6.1.1.jar;D:\maven\maven-repository\org\springframework\spring-context\6.1.1\spring-context-6.1.1.jar;D:\maven\maven-repository\org\springframework\spring-expression\6.1.1\spring-expression-6.1.1.jar;D:\maven\maven-repository\org\springframework\boot\spring-boot-starter-data-mongodb\3.5.6\spring-boot-starter-data-mongodb-3.5.6.jar;D:\maven\maven-repository\org\mongodb\mongodb-driver-sync\4.11.1\mongodb-driver-sync-4.11.1.jar;D:\maven\maven-repository\org\mongodb\bson\4.11.1\bson-4.11.1.jar;D:\maven\maven-repository\org\mongodb\mongodb-driver-core\4.11.1\mongodb-driver-core-4.11.1.jar;D:\maven\maven-repository\org\mongodb\bson-record-codec\4.11.1\bson-record-codec-4.11.1.jar;D:\maven\maven-repository\org\springframework\data\spring-data-mongodb\4.2.0\spring-data-mongodb-4.2.0.jar;D:\maven\maven-repository\org\springframework\spring-tx\6.1.1\spring-tx-6.1.1.jar;D:\maven\maven-repository\org\springframework\data\spring-data-commons\3.2.0\spring-data-commons-3.2.0.jar;D:\maven\maven-repository\org\slf4j\slf4j-api\2.0.9\slf4j-api-2.0.9.jar;D:\maven\maven-repository\org\mybatis\spring\boot\mybatis-spring-boot-starter\3.0.5\mybatis-spring-boot-starter-3.0.5.jar;D:\maven\maven-repository\org\springframework\boot\spring-boot-starter-jdbc\3.2.0\spring-boot-starter-jdbc-3.2.0.jar;D:\maven\maven-repository\com\zaxxer\HikariCP\5.0.1\HikariCP-5.0.1.jar;D:\maven\maven-repository\org\springframework\spring-jdbc\6.1.1\spring-jdbc-6.1.1.jar;D:\maven\maven-repository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\3.0.5\mybatis-spring-boot-autoconfigure-3.0.5.jar;D:\maven\maven-repository\org\mybatis\mybatis\3.5.19\mybatis-3.5.19.jar;D:\maven\maven-repository\org\mybatis\mybatis-spring\3.0.5\mybatis-spring-3.0.5.jar;D:\maven\maven-repository\com\mysql\mysql-connector-j\8.0.33\mysql-connector-j-8.0.33.jar;D:\maven\maven-repository\org\projectlombok\lombok\1.18.30\lombok-1.18.30.jar;D:\maven\maven-repository\org\springframework\spring-core\6.1.1\spring-core-6.1.1.jar;D:\maven\maven-repository\org\springframework\spring-jcl\6.1.1\spring-jcl-6.1.1.jar com.jsy.MongodbMysqlApplication . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.2.0) 2025-10-21T17:57:55.076+08:00 INFO 568 --- [ main] com.jsy.MongodbMysqlApplication : Starting MongodbMysqlApplication using Java 21.0.6 with PID 568 (D:\svn-workspace\Mongodb-MySQL\target\classes started by 123 in D:\svn-workspace\Mongodb-MySQL) 2025-10-21T17:57:55.080+08:00 INFO 568 --- [ main] com.jsy.MongodbMysqlApplication : No active profile set, falling back to 1 default profile: "default" 2025-10-21T17:57:56.652+08:00 INFO 568 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode. 2025-10-21T17:57:56.740+08:00 INFO 568 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 81 ms. Found 1 MongoDB repository interface. 2025-10-21T17:57:57.707+08:00 INFO 568 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http) 2025-10-21T17:57:57.722+08:00 INFO 568 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2025-10-21T17:57:57.722+08:00 INFO 568 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.16] 2025-10-21T17:57:57.806+08:00 INFO 568 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2025-10-21T17:57:57.806+08:00 INFO 568 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2626 ms 2025-10-21T17:57:58.225+08:00 INFO 568 --- [ main] org.mongodb.driver.client : MongoClient with metadata {"driver": {"name": "mongo-java-driver|sync|spring-boot", "version": "4.11.1"}, "os": {"type": "Windows", "name": "Windows 10", "architecture": "amd64", "version": "10.0"}, "platform": "Java/Oracle Corporation/21.0.6+8-LTS-jvmci-23.1-b55"} created with settings MongoClientSettings{readPreference=primary, writeConcern=WriteConcern{w=null, wTimeout=null ms, journal=null}, retryWrites=true, retryReads=true, readConcern=ReadConcern{level=null}, credential=null, transportSettings=null, streamFactoryFactory=null, commandListeners=[], codecRegistry=ProvidersCodecRegistry{codecProviders=[ValueCodecProvider{}, BsonValueCodecProvider{}, DBRefCodecProvider{}, DBObjectCodecProvider{}, DocumentCodecProvider{}, CollectionCodecProvider{}, IterableCodecProvider{}, MapCodecProvider{}, GeoJsonCodecProvider{}, GridFSFileCodecProvider{}, Jsr310CodecProvider{}, JsonObjectCodecProvider{}, BsonCodecProvider{}, EnumCodecProvider{}, com.mongodb.client.model.mql.ExpressionCodecProvider@1084ac45, com.mongodb.Jep395RecordCodecProvider@566f1852, com.mongodb.KotlinCodecProvider@6ea246af]}, loggerSettings=LoggerSettings{maxDocumentLength=1000}, clusterSettings={hosts=[localhost:27017], srvServiceName=mongodb, mode=SINGLE, requiredClusterType=UNKNOWN, requiredReplicaSetName='null', serverSelector='null', clusterListeners='[]', serverSelectionTimeout='30000 ms', localThreshold='15 ms'}, socketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=0, receiveBufferSize=0, proxySettings=ProxySettings{host=null, port=null, username=null, password=null}}, heartbeatSocketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=10000, receiveBufferSize=0, proxySettings=ProxySettings{host=null, port=null, username=null, password=null}}, connectionPoolSettings=ConnectionPoolSettings{maxSize=100, minSize=0, maxWaitTimeMS=120000, maxConnectionLifeTimeMS=0, maxConnectionIdleTimeMS=0, maintenanceInitialDelayMS=0, maintenanceFrequencyMS=60000, connectionPoolListeners=[], maxConnecting=2}, serverSettings=ServerSettings{heartbeatFrequencyMS=10000, minHeartbeatFrequencyMS=500, serverListeners='[]', serverMonitorListeners='[]'}, sslSettings=SslSettings{enabled=false, invalidHostNameAllowed=false, context=null}, applicationName='null', compressorList=[], uuidRepresentation=JAVA_LEGACY, serverApi=null, autoEncryptionSettings=null, dnsClient=null, inetAddressResolver=null, contextProvider=null} 2025-10-21T17:57:58.307+08:00 INFO 568 --- [localhost:27017] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=25, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=89051700} 2025-10-21T17:57:58.846+08:00 WARN 568 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'migrationController' defined in file [D:\svn-workspace\Mongodb-MySQL\target\classes\com\jsy\controller\MigrationController.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'dataMigrationServiceImpl' defined in file [D:\svn-workspace\Mongodb-MySQL\target\classes\com\jsy\service\impl\DataMigrationServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 1: Error creating bean with name 'mysqlMapper' defined in file [D:\svn-workspace\Mongodb-MySQL\target\classes\com\jsy\mapper\MysqlMapper.class]: Cannot resolve reference to bean 'sqlSessionTemplate' while setting bean property 'sqlSessionTemplate' 2025-10-21T17:57:58.853+08:00 INFO 568 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2025-10-21T17:57:58.919+08:00 INFO 568 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger : Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2025-10-21T17:57:58.944+08:00 ERROR 568 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active). Process finished with exit code 1 结合这些信息再次解析报错
10-22
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值