javavscode
javavscode copied to clipboard
debug console chinese garbled code
Language Support for Java(TM) by Red Hat Chinese output is normal 一级缓存拉模式同步消息每隔4秒,执行一次 layering-cache和redis创建订阅关系,订阅频道【[layering-cache-channel]】 ┏━━━━━ Debug [area.list] ━━━ ┣ 编译SQL: select * from area WHERE parent_code=? and name like concat('%',?,'%') ┣ 编译参数: [0, 一] ┣ 运行SQL: select * from area WHERE parent_code='0' and name like concat('%','一','%') ┣ ┣ 代码位置: com.sdnc.trade.application.service.area.AreaQrySvc.(AreaQrySvc.java:46) ┣ 执行时间: 71ms ┣ 返回结果: [0] ┗━━━━━ Debug [area.list] ━━━
Java Platform Support Chinese output garbled code �?级缓存拉模式同步消息每隔2秒,执行�?�? layering-cache和redis创建订阅关系,订阅频道�?�[layering-cache-channel]�? ┏━━━━━ Debug [area.list] ━━�? �? 编译SQL�? select * from area WHERE parent_code=? and name like concat('%',?,'%') �? 编译参数�? [0, �?] �? 运行SQL�? select * from area WHERE parent_code='0' and name like concat('%','�?','%') �? �? 代码位置�? com.sdnc.trade.application.service.area.AreaQrySvc.(AreaQrySvc.java:46) �? 执行时间�? 85ms �? 返回结果�? [0] ┗━━━━━ Debug [area.list] ━━�?
Can you please share some more details? For Example which OS you tried running the Java Platform VS Code extension, which version of VS Code you are using,etc.
Extension Name: Java Platform Support Extension Version: 1.0.0 OS Version: win10 VSCode version: 1.81.0 Java version: dragonwell-17 Gradle version: 8.3
To Reproduce
- installed Java Platform Support and Gradle Extension Pack
- update settings.json
{
"java.help.collectErrorLog": true,
"gradle.debug": true,
"gradle.disableConfirmations": true,
"gradle.javaDebug.cleanOutput": true,
"gradle.projectOpenBehaviour": "Open",
"gradle.showStoppedDaemons": true,
"java.codeGeneration.hashCodeEquals.useInstanceof": true,
"java.codeGeneration.hashCodeEquals.useJava7Objects": true,
"java.codeGeneration.insertionLocation": "lastMember",
"java.codeGeneration.toString.codeStyle": "STRING_BUILDER_CHAINED",
"java.codeGeneration.toString.skipNullValues": true,
"java.codeGeneration.useBlocks": true,
"java.configuration.maven.globalSettings": "D:\\apache-maven-3.6.3\\conf\\settings.xml",
"java.configuration.maven.userSettings": "D:\\apache-maven-3.6.3\\conf\\settings.xml",
"maven.settingsFile": "D:\\apache-maven-3.6.3\\conf\\settings.xml",
"java.import.gradle.wrapper.enabled": false,
"java.jdt.ls.androidSupport.enabled": "off",
"java.debug.settings.showQualifiedNames": true,
"java.debug.settings.showStaticVariables": true,
"maven.executable.preferMavenWrapper": false,
"maven.pomfile.autoUpdateEffectivePOM": true,
"maven.pomfile.prefetchEffectivePom": true,
"java.import.gradle.user.home": "D:\\gradle-repository",
"java.debug.logLevel": "verbose",
"spring.initializr.defaultOpenProjectMethod": "Open",
"gradle.javaDebug": {
"tasks": [
"run",
"runBoot",
"test",
"intTest",
"integration"
]
},
"java.compile.nullAnalysis.nonnull": [
"javax.annotation.Nonnull",
"org.eclipse.jdt.annotation.NonNull",
"org.springframework.lang.NonNull"
],
"java.configuration.updateBuildConfiguration": "disabled",
"java.compile.nullAnalysis.mode": "disabled",
"java.import.gradle.home": "D:\\gradle-8.3",
"java.saveActions.organizeImports": true,
"java.typeHierarchy.lazyLoad": true,
"java.implementationsCodeLens.enabled": true,
"java.inlayHints.parameterNames.enabled": "none",
"tabnine.experimentalAutoImports": true,
"terminal.explorerKind": "external",
"terminal.integrated.defaultProfile.windows": "Windows PowerShell",
"terminal.external.windowsExec": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"terminal.integrated.persistentSessionReviveProcess": "never",
"terminal.integrated.tabs.focusMode": "singleClick",
"java.maven.downloadSources": true,
"java.eclipse.downloadSources": true,
"boot-java.rewrite.reconcile": true,
"redhat.telemetry.enabled": false,
"java.home": "D:\\dragonwell-17",
"java.jdt.ls.java.home": "D:\\dragonwell-17",
"java.import.gradle.java.home": "D:\\dragonwell-17",
"maven.terminal.useJavaHome": true,
"boot-java.validation.java.boot2": "ON",
"boot-java.change-detection.on": true,
"boot-java.validation.java.boot3": "ON",
"search.useParentIgnoreFiles": true,
"java.debug.settings.console": "internalConsole",
"java.maven.updateSnapshots": true,
"java.referencesCodeLens.enabled": true,
"files.defaultLanguage": "UTF-8",
"java.project.encoding": "setDefault",
"java.project.importHint": false,
"maven.projectOpenBehavior": "Open",
"spring-boot.ls.java.home": "D:\\dragonwell-17",
"java.dependency.packagePresentation": "hierarchical",
"java.dependency.showMembers": true,
"java.import.maven.disableTestClasspathFlag": true,
"java.completion.favoriteStaticMembers": [
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*"
],
"java.debug.settings.forceBuildBeforeLaunch": false,
"gradle.focusTaskInExplorer": false,
"java.completion.chain.enabled": true,
"java.completion.guessMethodArguments": "insertBestGuessedArguments",
"java.import.generatesMetadataFilesAtProjectRoot": false,
"[java]": {
"editor.defaultFormatter": "redhat.java"
}
}
maven, java17, gradle8.3 are local installation directories 3. clone project by https://github.com/853103174/cqrs-tpl 4. Execute SQL on mysql
CREATE DATABASE IF NOT EXISTS `fresh-test`;
USE `fresh-test`;
CREATE TABLE IF NOT EXISTS `area` (
`code` mediumint(8) unsigned NOT NULL COMMENT '编码',
`name` varchar(10) DEFAULT NULL COMMENT '名称',
`parent_code` mediumint(8) unsigned DEFAULT NULL COMMENT '父编码(0:省 其他:市县)',
`full_name` varchar(20) DEFAULT NULL COMMENT '完整名称',
`type` tinyint(1) unsigned DEFAULT NULL COMMENT '类型(1:省 2:市 3:县)',
`lon` decimal(9,6) DEFAULT NULL COMMENT '经度',
`lat` decimal(8,6) DEFAULT NULL COMMENT '纬度',
`sort` tinyint(3) unsigned DEFAULT NULL COMMENT '排序',
`weather_code` int(10) unsigned DEFAULT NULL COMMENT '天气网编码',
PRIMARY KEY (`code`) USING BTREE
) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 COMMENT='行政区划表';
- set jdbcUrl,username,password and host on cqrs-tpl\trade-hall\src\main\resources\dev\application.yml
- run with cqrs-tpl\trade-hall\src\main\java\com\sdnc\trade\TradeHallApplication.java
- Send get request: http://127.0.0.1:8811/qry/area/list?code=110000&parentCode=0&name=一&pageNum=1&pageSize=10
- Correct content output from the console ┏━━━━━ Debug [area.list] ━━━ ┣ 编译SQL: select * from area WHERE parent_code=? and name like concat('%',?,'%') ┣ 编译参数: [0, 一] ┣ 运行SQL: select * from area WHERE parent_code='0' and name like concat('%','一','%') ┣ ┣ 代码位置: com.sdnc.trade.application.service.area.AreaQrySvc.(AreaQrySvc.java:46) ┣ 执行时间: 71ms ┣ 返回结果: [0] ┗━━━━━ Debug [area.list] ━━━
@Achal1607 The above is detailed configuration information
Another suggestion is that when the Projects Explorer displays the Java package structure, the following configurations can be reused: "java.dependency.packagePresentation": "hierarchical"
It seems that you are using Java Platform Support extension with the Gradle Extension Pack. So, maybe there can be conflicts between the extensions. SInce, extension provided by us also has gradle support. So, can you please try disabling the gradle extension pack, after that running the query and fetching the console output using only our extension.
@853103174 This should be resolved with version 22.0.0 of the extension . Please try with the latest version of the extension and let us know if it works fine .