IntelliJ IDEA编译生成class文件运行的问题

图片说明
如图,我在src目录下存放源代码,然后resources目录下存放要读取的文件,由于默认的当前路径是Module目录,所以我的文件访问路径“resources/test.txt”
这个程序运行没有问题,但是如果我想运行编译后的程序即class文件,这个目录是错误的
图片说明
有没有一种一次设置,问题全部解决的方法
我感觉这样不符合idea的精致啊!

1个回答

指定编译生成后的class文件和resource下的文件都输出到target/classes 文件夹下,那么访问resource文件夹下的文件的方法就是
String filePath = CurrentDirTest.class.getClassLoader.getResource("").getPath() + "test.txt"
BufferedReader br = new BufferedReader(filepath);
br.readLine();

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
intellij idea 使用的一些问题。
intellij在编译java项目的时候,同一个项目中有不同的模块,但是编译的时候一个模块编译成了class文件,另外的模块却没有编译。 第二个问题:intellij打开一个java文件,在编辑区默认的不是编辑模式,需要先按一下insert键才能编辑,有没有高手知道如何设置?求点播。
IDEA编译过期API错误的问题
是这样的,我有个工程,在eclipse上面编译运行都没有问题,然后我在IDEA2017上checkout了这个 工程,编译的时候就编译出错,我打开出错的地方看了下是由于添加 @Removal 注解的地方, 在IDEA打开.class源文件查看的时候,这些内容都没有,但是在eclipse里这些 注解的代码都在. 下面是图: idea编译出错: ![图片说明](https://img-ask.csdn.net/upload/201711/10/1510297385_810106.png) 出错的class查看,Eclipse ![图片说明](https://img-ask.csdn.net/upload/201711/10/1510297643_383731.png) 可以看到,在这个class里是有这个属性的,但是加了@Removal注解 IDEA2017: ![图片说明](https://img-ask.csdn.net/upload/201711/10/1510297925_312310.png) 可以看到没有这个属性,我看了下,里面一个带@Removal注解的属性都没有 有没有大神遇到过并解决了的...
急急急!!!IntelliJ IDEA 14.1.4 编译后中文乱码
编写一个简单项目 System.out.println("中文");是可以显示中文的,编译后.class就是乱码,控制台输出也是乱码,已经试了很多办法没有解决,求大神帮忙解决![图片说明](https://img-ask.csdn.net/upload/201508/07/1438918326_486960.png)这个是java文件,![图片说明](https://img-ask.csdn.net/upload/201508/07/1438918333_73677.png)这个是编译后class文件,是乱码
IntelliJ IDEA开发工具刚刚使用不久,求解答解答我这种白菜!
![图片说明](https://img-ask.csdn.net/upload/201702/10/1486716908_777516.png) 我的项目中有编译好的类文件,为什么到了web.xml文件中却报错!刚刚使用IntelliJ IDEA不久,也不知道本人哪里配置错了什么!弄得我心塞!!~~求解答谢谢了!
idea如何设置编译器。
使用idea编译出来的class文件和eclipse编译出来的相差很多,怎么设置呢? 1.idea版本2018.3.5 2.项目是web项目,配置本地电脑上的tomcat7运行调试,jdk版本1.7 3.其他同事都在使用eclipse,我使用idea,我们把写完的代码编译后用Beyond Compare 4传到服务器,发现同样的源码编译出来的class文件相差较大。 我度娘查到进行了如下设置,但是不管用: ![图片说明](https://img-ask.csdn.net/upload/201904/28/1556415507_738183.png) 这和我使用的本地tomcat有关系吗,我使用的是本地tomcat运行项目,将项目发布到tomcat的webapps中。
请教大神关于在idea上上传文件的路径问题
自己尝试了下在idea上写了一个layui+spring mvc的文件上传功能,在保存文件的时候发现这样一个问题: idea在编译项目的时候,会在项目的目录下面默认创建一个out目录来存储.class文件,这个out目录也会成为这个项目的工程目录。 所以当我们上传文件,在保存文件时,如果我们用request.getSession().getServletContext().getRealPath("/"),获取到的是这个out目录(例如:F:\springjpa\out\artifacts\springjpa_war_exploded) 而不是项目的web目录,导致文件会保存到out目录里面,这样我们在前台的时候怎么获取保存在out目录里面的图片啊?
Class<T>、Class引发的小故事,大佬大佬快进来QAQ,help!!!
String.class 的类型是 Class< String > 因class是关键字, 所以类名.class编译时确定。而getclass()是某个具体的方法来调用,是运行时根据实际实例确定,getClass()是动态而且是final的。 > 基本数据类型的封装类还可以通过.TYPE 的方式获取其 Class 对象,但要注意。TYPE 实际上获取的封装类对应的基本类型的 Class 对象的引用。 问题1、Class< T >就是Class类,只不过是类型为T的类,所以Class< T >可以叫做是类实例、类类型但是还可以叫字节码文件? 问题2、 Class< T >和Class类是同一者,只是前者的类类型为T,这个我没理解错吧? 问题3、明明用.class方法就可以获取对应的class字节码对象,为啥基本类型包装类还要用.TYPE方式去获取?可不可以就只用.class方式获取?(而且.TYPE方式获取的还是对应的基本类型的 Class 对象的引用,并不是class对象) ``` public static final Class<Integer> TYPE = (Class<Integer>) Class.getPrimitiveClass("int"); ```
ieda 编译后报错Error:(2, 1) java: 需要class, interface或enum;该怎么办
{ "title" : "调试:com.intellij.database.psi.DbTableImpl", "methodList" : [ { "name" : "isSystem", "desc" : "public boolean com.intellij.database.psi.DbTableImpl.isSystem()", "value" : "false" }, { "name" : "isTemporary", "desc" : "public boolean com.intellij.database.psi.DbTableImpl.isTemporary()", "value" : "false" }, { "name" : "getDocumentation", "desc" : "public java.lang.StringBuilder com.intellij.database.psi.DbTableImpl.getDocumentation()", "value" : "<html><body><b>Data Source:</b> @localhost<br><b>Schema:</b> book<br><b>Table:</b> book<br><br><code><pre><font color=\"#808080\">-- auto-generated definition</font>\n<font color=\"#cc7832\"><b>create</b></font> <font color=\"#cc7832\"><b>table</b></font> book\n(\n id <font color=\"#cc7832\"><b>int</b></font> <font color=\"#cc7832\"><b>null</b></font><font color=\"#cc7832\">,</font>\n price <font color=\"#cc7832\"><b>double</b></font> <font color=\"#cc7832\"><b>null</b></font>\n)<font color=\"#cc7832\">;</font></pre></code>" }, { "name" : "getDocumentation", "desc" : "public java.lang.CharSequence com.intellij.database.psi.DbTableImpl.getDocumentation()", "value" : "<html><body><b>Data Source:</b> @localhost<br><b>Schema:</b> book<br><b>Table:</b> book<br><br><code><pre><font color=\"#808080\">-- auto-generated definition</font>\n<font color=\"#cc7832\"><b>create</b></font> <font color=\"#cc7832\"><b>table</b></font> book\n(\n id <font color=\"#cc7832\"><b>int</b></font> <font color=\"#cc7832\"><b>null</b></font><font color=\"#cc7832\">,</font>\n price <font color=\"#cc7832\"><b>double</b></font> <font color=\"#cc7832\"><b>null</b></font>\n)<font color=\"#cc7832\">;</font></pre></code>" }, { "name" : "getColumnAttrs", "desc" : "public java.util.Set<com.intellij.database.model.DasColumn$Attribute> com.intellij.database.psi.DbTableImpl.getColumnAttrs(com.intellij.database.model.DasColumn)", "value" : null }, { "name" : "getName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getName()", "value" : "book" }, { "name" : "getName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getName(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "getLanguage", "desc" : "public com.intellij.lang.Language com.intellij.database.psi.DbElementImpl.getLanguage()", "value" : "Language: SQL" }, { "name" : "getTypeName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getTypeName()", "value" : "table" }, { "name" : "getParent", "desc" : "public com.intellij.database.psi.DbElement com.intellij.database.psi.DbElementImpl.getParent()", "value" : "schema:book" }, { "name" : "getParent", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.getParent()", "value" : "schema:book" }, { "name" : "getParent", "desc" : "public com.intellij.psi.PsiFileSystemItem com.intellij.database.psi.DbElementImpl.getParent()", "value" : "schema:book" }, { "name" : "init", "desc" : "public void com.intellij.database.psi.DbElementImpl.init(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "setName", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.setName(java.lang.String) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "isDirectory", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isDirectory()", "value" : "false" }, { "name" : "getDeclaration", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.getDeclaration()", "value" : "table:book" }, { "name" : "isValid", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isValid()", "value" : "true" }, { "name" : "getText", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getText()", "value" : "create table book\n(\n id int null,\n price double null\n);\n\n" }, { "name" : "getComment", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getComment()", "value" : null }, { "name" : "isWritable", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isWritable()", "value" : "true" }, { "name" : "newDeclarationProcessor", "desc" : "public static com.intellij.util.Processor<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.newDeclarationProcessor(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "createDeclarationProcessor", "desc" : "public com.intellij.util.Processor<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.createDeclarationProcessor(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "getIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getIcon()", "value" : "Deferred. Base=Row icon. myIcons=[jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/table.svg, null]" }, { "name" : "getIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getIcon(boolean)", "value" : null }, { "name" : "getManager", "desc" : "public com.intellij.psi.PsiManager com.intellij.database.psi.DbElementImpl.getManager()", "value" : "com.intellij.psi.impl.PsiManagerImpl@6823f16" }, { "name" : "getWeight", "desc" : "public int com.intellij.database.psi.DbElementImpl.getWeight()", "value" : "10000" }, { "name" : "isCaseSensitive", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isCaseSensitive()", "value" : "false" }, { "name" : "getPosition", "desc" : "public short com.intellij.database.psi.DbElementImpl.getPosition()", "value" : "0" }, { "name" : "getChildren", "desc" : "public com.intellij.psi.PsiElement[] com.intellij.database.psi.DbElementImpl.getChildren()", "value" : "[Lcom.intellij.psi.PsiElement;@55d5f84e" }, { "name" : "getDelegate", "desc" : "public D com.intellij.database.psi.DbElementImpl.getDelegate()", "value" : "book: table" }, { "name" : "getKind", "desc" : "public com.intellij.database.model.ObjectKind com.intellij.database.psi.DbElementImpl.getKind()", "value" : "table" }, { "name" : "getProject", "desc" : "public com.intellij.openapi.project.Project com.intellij.database.psi.DbElementImpl.getProject()", "value" : "Project 'E:\\2019实践学期' demo" }, { "name" : "getVirtualFile", "desc" : "public com.intellij.openapi.vfs.VirtualFile com.intellij.database.psi.DbElementImpl.getVirtualFile()", "value" : "DB VirtualFile: table, book.book [@localhost] (Valid)" }, { "name" : "getMetaData", "desc" : "public com.intellij.psi.meta.PsiMetaData com.intellij.database.psi.DbElementImpl.getMetaData()", "value" : "table:book" }, { "name" : "getLocationString", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getLocationString()", "value" : "book [@localhost]" }, { "name" : "processDeclarations", "desc" : "public final boolean com.intellij.database.psi.DbElementImpl.processDeclarations(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "navigate", "desc" : "public void com.intellij.database.psi.DbElementImpl.navigate(boolean)", "value" : null }, { "name" : "canNavigate", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.canNavigate()", "value" : null }, { "name" : "acceptChildren", "desc" : "public void com.intellij.database.psi.DbElementImpl.acceptChildren(com.intellij.psi.PsiElementVisitor)", "value" : null }, { "name" : "processChildren", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.processChildren(com.intellij.psi.search.PsiElementProcessor<com.intellij.psi.PsiFileSystemItem>)", "value" : null }, { "name" : "getDataSource", "desc" : "public com.intellij.database.psi.DbDataSource com.intellij.database.psi.DbElementImpl.getDataSource()", "value" : "root:@localhost" }, { "name" : "getDataSource", "desc" : "public com.intellij.database.psi.DbDataSourceImpl com.intellij.database.psi.DbElementImpl.getDataSource()", "value" : "root:@localhost" }, { "name" : "checkSetName", "desc" : "public void com.intellij.database.psi.DbElementImpl.checkSetName(java.lang.String) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "getDasParent", "desc" : "public P com.intellij.database.psi.DbElementImpl.getDasParent()", "value" : "schema:book" }, { "name" : "getDasParent", "desc" : "public com.intellij.database.model.DasObject com.intellij.database.psi.DbElementImpl.getDasParent()", "value" : "schema:book" }, { "name" : "getDasChildren", "desc" : "public com.intellij.util.containers.JBIterable<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.getDasChildren(com.intellij.database.model.ObjectKind)", "value" : null }, { "name" : "canNavigateToSource", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.canNavigateToSource()", "value" : null }, { "name" : "getBaseIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getBaseIcon()", "value" : "jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/table.svg" }, { "name" : "getNode", "desc" : "public com.intellij.lang.ASTNode com.intellij.psi.impl.FakePsiElement.getNode()", "value" : null }, { "name" : "getTextLength", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getTextLength()", "value" : "0" }, { "name" : "getFirstChild", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getFirstChild()", "value" : null }, { "name" : "getLastChild", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getLastChild()", "value" : null }, { "name" : "getNextSibling", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getNextSibling()", "value" : null }, { "name" : "getIcon", "desc" : "public final javax.swing.Icon com.intellij.psi.impl.FakePsiElement.getIcon(int)", "value" : null }, { "name" : "getPresentation", "desc" : "public com.intellij.navigation.ItemPresentation com.intellij.psi.impl.FakePsiElement.getPresentation()", "value" : "table:book" }, { "name" : "getTextOffset", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getTextOffset()", "value" : "0" }, { "name" : "getPrevSibling", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getPrevSibling()", "value" : null }, { "name" : "isPhysical", "desc" : "public boolean com.intellij.psi.impl.FakePsiElement.isPhysical()", "value" : "false" }, { "name" : "getTextRange", "desc" : "public com.intellij.openapi.util.TextRange com.intellij.psi.impl.FakePsiElement.getTextRange()", "value" : null }, { "name" : "findElementAt", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.findElementAt(int)", "value" : null }, { "name" : "getStartOffsetInParent", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getStartOffsetInParent()", "value" : "0" }, { "name" : "textContains", "desc" : "public boolean com.intellij.psi.impl.FakePsiElement.textContains(char)", "value" : null }, { "name" : "textToCharArray", "desc" : "public char[] com.intellij.psi.impl.FakePsiElement.textToCharArray()", "value" : null }, { "name" : "getPresentableText", "desc" : "public java.lang.String com.intellij.psi.impl.FakePsiElement.getPresentableText()", "value" : "book" }, { "name" : "add", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.add(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "replace", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.replace(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "checkDelete", "desc" : "public void com.intellij.psi.impl.PsiElementBase.checkDelete() throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "delete", "desc" : "public void com.intellij.psi.impl.PsiElementBase.delete() throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "accept", "desc" : "public void com.intellij.psi.impl.PsiElementBase.accept(com.intellij.psi.PsiElementVisitor)", "value" : null }, { "name" : "getContext", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getContext()", "value" : "schema:book" }, { "name" : "copy", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.copy()", "value" : null }, { "name" : "addRange", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRange(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addBefore", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addBefore(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addAfter", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addAfter(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "getReference", "desc" : "public com.intellij.psi.PsiReference com.intellij.psi.impl.PsiElementBase.getReference()", "value" : null }, { "name" : "getContainingFile", "desc" : "public com.intellij.psi.PsiFile com.intellij.psi.impl.PsiElementBase.getContainingFile()", "value" : null }, { "name" : "getOriginalElement", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getOriginalElement()", "value" : "table:book" }, { "name" : "getNavigationElement", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getNavigationElement()", "value" : "table:book" }, { "name" : "getUseScope", "desc" : "public com.intellij.psi.search.SearchScope com.intellij.psi.impl.PsiElementBase.getUseScope()", "value" : "Project and Libraries" }, { "name" : "getResolveScope", "desc" : "public com.intellij.psi.search.GlobalSearchScope com.intellij.psi.impl.PsiElementBase.getResolveScope()", "value" : "Project and Libraries" }, { "name" : "getReferences", "desc" : "public com.intellij.psi.PsiReference[] com.intellij.psi.impl.PsiElementBase.getReferences()", "value" : "[Lcom.intellij.psi.PsiReference;@140035ec" }, { "name" : "checkAdd", "desc" : "public void com.intellij.psi.impl.PsiElementBase.checkAdd(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addRangeBefore", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRangeBefore(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addRangeAfter", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRangeAfter(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "findReferenceAt", "desc" : "public com.intellij.psi.PsiReference com.intellij.psi.impl.PsiElementBase.findReferenceAt(int)", "value" : null }, { "name" : "textMatches", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.textMatches(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "textMatches", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.textMatches(java.lang.CharSequence)", "value" : null }, { "name" : "isEquivalentTo", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.isEquivalentTo(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "deleteChildRange", "desc" : "public void com.intellij.psi.impl.PsiElementBase.deleteChildRange(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "isNativeFileType", "desc" : "public static boolean com.intellij.psi.impl.ElementBase.isNativeFileType(com.intellij.openapi.fileTypes.FileType)", "value" : null }, { "name" : "overlayIcons", "desc" : "public static javax.swing.Icon com.intellij.psi.impl.ElementBase.overlayIcons(javax.swing.Icon...)", "value" : null }, { "name" : "buildRowIcon", "desc" : "public static com.intellij.ui.RowIcon com.intellij.psi.impl.ElementBase.buildRowIcon(javax.swing.Icon,javax.swing.Icon)", "value" : null }, { "name" : "transformFlags", "desc" : "public static int com.intellij.psi.impl.ElementBase.transformFlags(com.intellij.psi.PsiElement,int)", "value" : null }, { "name" : "createLayeredIcon", "desc" : "public static com.intellij.ui.RowIcon com.intellij.psi.impl.ElementBase.createLayeredIcon(com.intellij.openapi.util.Iconable,javax.swing.Icon,int)", "value" : null }, { "name" : "iconWithVisibilityIfNeeded", "desc" : "public static javax.swing.Icon com.intellij.psi.impl.ElementBase.iconWithVisibilityIfNeeded(int,javax.swing.Icon,javax.swing.Icon)", "value" : null }, { "name" : "registerIconLayer", "desc" : "public static void com.intellij.psi.impl.ElementBase.registerIconLayer(int,javax.swing.Icon)", "value" : null }, { "name" : "replace", "desc" : "public <T> boolean com.intellij.openapi.util.UserDataHolderBase.replace(com.intellij.openapi.util.Key<T>,T,T)", "value" : null }, { "name" : "getUserData", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.getUserData(com.intellij.openapi.util.Key<T>)", "value" : null }, { "name" : "copyUserDataTo", "desc" : "public void com.intellij.openapi.util.UserDataHolderBase.copyUserDataTo(com.intellij.openapi.util.UserDataHolderBase)", "value" : null }, { "name" : "isUserDataEmpty", "desc" : "public boolean com.intellij.openapi.util.UserDataHolderBase.isUserDataEmpty()", "value" : "false" }, { "name" : "putUserData", "desc" : "public <T> void com.intellij.openapi.util.UserDataHolderBase.putUserData(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "getCopyableUserData", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.getCopyableUserData(com.intellij.openapi.util.Key<T>)", "value" : null }, { "name" : "putCopyableUserData", "desc" : "public <T> void com.intellij.openapi.util.UserDataHolderBase.putCopyableUserData(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "copyCopyableDataTo", "desc" : "public void com.intellij.openapi.util.UserDataHolderBase.copyCopyableDataTo(com.intellij.openapi.util.UserDataHolderBase)", "value" : null }, { "name" : "getUserDataString", "desc" : "public java.lang.String com.intellij.openapi.util.UserDataHolderBase.getUserDataString()", "value" : "{CACHED_SMART_POINTER_KEY=com.intellij.reference.SoftReference@2190c68d, lastComputedIcon={0=Row icon. myIcons=[jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/table.svg, null]}, COLOR_KEY=com.intellij.database.view.DatabaseColorManager$CachedColor@36fd2726}" }, { "name" : "putUserDataIfAbsent", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.putUserDataIfAbsent(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "getTextRangeInParent", "desc" : "public default com.intellij.openapi.util.TextRange com.intellij.psi.PsiElement.getTextRangeInParent()", "value" : "(0,0)" }, { "name" : "getDbParent", "desc" : "public default com.intellij.database.model.DasObject com.intellij.database.model.DasObject.getDbParent()", "value" : "schema:book" }, { "name" : "getDbChildren", "desc" : "public default <C> com.intellij.util.containers.JBIterable<C> com.intellij.database.model.DasObject.getDbChildren(java.lang.Class<C>,com.intellij.database.model.ObjectKind)", "value" : null }, { "name" : "getDependencies", "desc" : "public default java.lang.Object[] com.intellij.psi.meta.PsiMetaData.getDependencies()", "value" : "[Ljava.lang.Object;@4c90ae3f" }, { "name" : "getDependences", "desc" : "public default java.lang.Object[] com.intellij.psi.meta.PsiMetaData.getDependences()", "value" : "[Ljava.lang.Object;@4c90ae3f" } ], "----" : "-----------------我是一条华丽的分割线-----------------", "fieldList" : [ { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@689a33b9" }, { "name" : "WEIGHT_BASE", "type" : "int", "value" : "10000" }, { "name" : "WEIGHT_INC", "type" : "int", "value" : "1000" }, { "name" : "myParent", "type" : "com.intellij.database.psi.DbElement", "value" : "schema:book" }, { "name" : "myDelegate", "type" : "java.lang.Object", "value" : "book: table" }, { "name" : "myTransactionalVersion", "type" : "long", "value" : "11" }, { "name" : "ASYNC_DOC_CUT", "type" : "java.lang.String", "value" : "<!-- async-doc-cut -->" }, { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@63538153" }, { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@57ae08e7" }, { "name" : "FLAGS_LOCKED", "type" : "int", "value" : "2048" }, { "name" : "ICON_COMPUTE", "type" : "com.intellij.util.NullableFunction", "value" : "com.intellij.psi.impl.ElementBase$$Lambda$705/682411935@622e87c4" }, { "name" : "VISIBILITY_ICON_PLACEHOLDER", "type" : "com.intellij.openapi.util.NotNullLazyValue", "value" : "com.intellij.psi.impl.ElementBase$1@5b1067c3" }, { "name" : "ICON_PLACEHOLDER", "type" : "com.intellij.openapi.util.NotNullLazyValue", "value" : "com.intellij.psi.impl.ElementBase$2@24b63ceb" }, { "name" : "ourIconLayers", "type" : "java.util.List", "value" : "[com.intellij.psi.impl.ElementBase$IconLayer@3f8e1aa, com.intellij.psi.impl.ElementBase$IconLayer@157e46b6, com.intellij.psi.impl.ElementBase$IconLayer@4d0815a5, com.intellij.psi.impl.ElementBase$IconLayer@58cc298b]" }, { "name" : "COPYABLE_USER_MAP_KEY", "type" : "com.intellij.openapi.util.Key", "value" : "COPYABLE_USER_MAP_KEY" }, { "name" : "myUserMap", "type" : "com.intellij.util.keyFMap.KeyFMap", "value" : "{CACHED_SMART_POINTER_KEY=com.intellij.reference.SoftReference@2190c68d, lastComputedIcon={0=Row icon. myIcons=[jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/table.svg, null]}, COLOR_KEY=com.intellij.database.view.DatabaseColorManager$CachedColor@36fd2726}" }, { "name" : "updater", "type" : "com.intellij.util.concurrency.AtomicFieldUpdater", "value" : "com.intellij.util.concurrency.AtomicFieldUpdater@1c7d7689" } ] } //调试列原始对象 { "title" : "调试:com.intellij.database.psi.DbColumnImpl", "methodList" : [ { "name" : "getDefault", "desc" : "public java.lang.String com.intellij.database.psi.DbColumnImpl.getDefault()", "value" : null }, { "name" : "getParent", "desc" : "public com.intellij.database.psi.DbTable com.intellij.database.psi.DbColumnImpl.getParent()", "value" : "table:book" }, { "name" : "getParent", "desc" : "public com.intellij.database.psi.DbElement com.intellij.database.psi.DbColumnImpl.getParent()", "value" : "table:book" }, { "name" : "getParent", "desc" : "public com.intellij.psi.PsiFileSystemItem com.intellij.database.psi.DbColumnImpl.getParent()", "value" : "table:book" }, { "name" : "getParent", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbColumnImpl.getParent()", "value" : "table:book" }, { "name" : "getTable", "desc" : "public com.intellij.database.model.DasTable com.intellij.database.psi.DbColumnImpl.getTable()", "value" : "table:book" }, { "name" : "getTable", "desc" : "public com.intellij.database.psi.DbTable com.intellij.database.psi.DbColumnImpl.getTable()", "value" : "table:book" }, { "name" : "getWeight", "desc" : "public int com.intellij.database.psi.DbColumnImpl.getWeight()", "value" : "10030" }, { "name" : "getDataType", "desc" : "public com.intellij.database.model.DataType com.intellij.database.psi.DbColumnImpl.getDataType()", "value" : "int(11)" }, { "name" : "isNotNull", "desc" : "public boolean com.intellij.database.psi.DbColumnImpl.isNotNull()", "value" : "false" }, { "name" : "getDocumentation", "desc" : "public java.lang.StringBuilder com.intellij.database.psi.DbColumnImpl.getDocumentation()", "value" : "<html><body><b>Data Source:</b> @localhost<br><b>Schema:</b> book<br><b>Table:</b> book<br><b>Column:</b> id<br><br><code><pre><font color=\"#cc7832\"><b>alter</b></font> <font color=\"#cc7832\"><b>table</b></font> book\n <font color=\"#cc7832\"><b>add</b></font> id <font color=\"#cc7832\"><b>int</b></font> <font color=\"#cc7832\"><b>null</b></font><font color=\"#cc7832\">;</font>\n\n</pre></code>" }, { "name" : "getDocumentation", "desc" : "public java.lang.CharSequence com.intellij.database.psi.DbColumnImpl.getDocumentation()", "value" : "<html><body><b>Data Source:</b> @localhost<br><b>Schema:</b> book<br><b>Table:</b> book<br><b>Column:</b> id<br><br><code><pre><font color=\"#cc7832\"><b>alter</b></font> <font color=\"#cc7832\"><b>table</b></font> book\n <font color=\"#cc7832\"><b>add</b></font> id <font color=\"#cc7832\"><b>int</b></font> <font color=\"#cc7832\"><b>null</b></font><font color=\"#cc7832\">;</font>\n\n</pre></code>" }, { "name" : "getTableName", "desc" : "public java.lang.String com.intellij.database.psi.DbColumnImpl.getTableName()", "value" : "book" }, { "name" : "getName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getName()", "value" : "id" }, { "name" : "getName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getName(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "getLanguage", "desc" : "public com.intellij.lang.Language com.intellij.database.psi.DbElementImpl.getLanguage()", "value" : "Language: SQL" }, { "name" : "getTypeName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getTypeName()", "value" : "column" }, { "name" : "init", "desc" : "public void com.intellij.database.psi.DbElementImpl.init(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "setName", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.setName(java.lang.String) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "isDirectory", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isDirectory()", "value" : "false" }, { "name" : "getDeclaration", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.getDeclaration()", "value" : "column:id" }, { "name" : "isValid", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isValid()", "value" : "true" }, { "name" : "getText", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getText()", "value" : "alter table book\n add id int null;\n\n" }, { "name" : "getComment", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getComment()", "value" : null }, { "name" : "isWritable", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isWritable()", "value" : "true" }, { "name" : "newDeclarationProcessor", "desc" : "public static com.intellij.util.Processor<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.newDeclarationProcessor(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "createDeclarationProcessor", "desc" : "public com.intellij.util.Processor<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.createDeclarationProcessor(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "getIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getIcon()", "value" : "Deferred. Base=jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/col.svg" }, { "name" : "getIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getIcon(boolean)", "value" : null }, { "name" : "getManager", "desc" : "public com.intellij.psi.PsiManager com.intellij.database.psi.DbElementImpl.getManager()", "value" : "com.intellij.psi.impl.PsiManagerImpl@6823f16" }, { "name" : "isCaseSensitive", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isCaseSensitive()", "value" : "false" }, { "name" : "getPosition", "desc" : "public short com.intellij.database.psi.DbElementImpl.getPosition()", "value" : "1" }, { "name" : "getChildren", "desc" : "public com.intellij.psi.PsiElement[] com.intellij.database.psi.DbElementImpl.getChildren()", "value" : "[Lcom.intellij.psi.PsiElement;@55d5f84e" }, { "name" : "getDelegate", "desc" : "public D com.intellij.database.psi.DbElementImpl.getDelegate()", "value" : "id: column" }, { "name" : "getKind", "desc" : "public com.intellij.database.model.ObjectKind com.intellij.database.psi.DbElementImpl.getKind()", "value" : "column" }, { "name" : "getProject", "desc" : "public com.intellij.openapi.project.Project com.intellij.database.psi.DbElementImpl.getProject()", "value" : "Project 'E:\\2019实践学期' demo" }, { "name" : "getVirtualFile", "desc" : "public com.intellij.openapi.vfs.VirtualFile com.intellij.database.psi.DbElementImpl.getVirtualFile()", "value" : "DB VirtualFile: column, book.book.id [@localhost] (Valid)" }, { "name" : "getMetaData", "desc" : "public com.intellij.psi.meta.PsiMetaData com.intellij.database.psi.DbElementImpl.getMetaData()", "value" : "column:id" }, { "name" : "getLocationString", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getLocationString()", "value" : "book.book [@localhost]" }, { "name" : "processDeclarations", "desc" : "public final boolean com.intellij.database.psi.DbElementImpl.processDeclarations(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "navigate", "desc" : "public void com.intellij.database.psi.DbElementImpl.navigate(boolean)", "value" : null }, { "name" : "canNavigate", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.canNavigate()", "value" : null }, { "name" : "acceptChildren", "desc" : "public void com.intellij.database.psi.DbElementImpl.acceptChildren(com.intellij.psi.PsiElementVisitor)", "value" : null }, { "name" : "processChildren", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.processChildren(com.intellij.psi.search.PsiElementProcessor<com.intellij.psi.PsiFileSystemItem>)", "value" : null }, { "name" : "getDataSource", "desc" : "public com.intellij.database.psi.DbDataSource com.intellij.database.psi.DbElementImpl.getDataSource()", "value" : "root:@localhost" }, { "name" : "getDataSource", "desc" : "public com.intellij.database.psi.DbDataSourceImpl com.intellij.database.psi.DbElementImpl.getDataSource()", "value" : "root:@localhost" }, { "name" : "checkSetName", "desc" : "public void com.intellij.database.psi.DbElementImpl.checkSetName(java.lang.String) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "getDasParent", "desc" : "public P com.intellij.database.psi.DbElementImpl.getDasParent()", "value" : "table:book" }, { "name" : "getDasParent", "desc" : "public com.intellij.database.model.DasObject com.intellij.database.psi.DbElementImpl.getDasParent()", "value" : "table:book" }, { "name" : "getDasChildren", "desc" : "public com.intellij.util.containers.JBIterable<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.getDasChildren(com.intellij.database.model.ObjectKind)", "value" : null }, { "name" : "canNavigateToSource", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.canNavigateToSource()", "value" : null }, { "name" : "getBaseIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getBaseIcon()", "value" : "jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/col.svg" }, { "name" : "getNode", "desc" : "public com.intellij.lang.ASTNode com.intellij.psi.impl.FakePsiElement.getNode()", "value" : null }, { "name" : "getTextLength", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getTextLength()", "value" : "0" }, { "name" : "getFirstChild", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getFirstChild()", "value" : null }, { "name" : "getLastChild", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getLastChild()", "value" : null }, { "name" : "getNextSibling", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getNextSibling()", "value" : null }, { "name" : "getIcon", "desc" : "public final javax.swing.Icon com.intellij.psi.impl.FakePsiElement.getIcon(int)", "value" : null }, { "name" : "getPresentation", "desc" : "public com.intellij.navigation.ItemPresentation com.intellij.psi.impl.FakePsiElement.getPresentation()", "value" : "column:id" }, { "name" : "getTextOffset", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getTextOffset()", "value" : "0" }, { "name" : "getPrevSibling", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getPrevSibling()", "value" : null }, { "name" : "isPhysical", "desc" : "public boolean com.intellij.psi.impl.FakePsiElement.isPhysical()", "value" : "false" }, { "name" : "getTextRange", "desc" : "public com.intellij.openapi.util.TextRange com.intellij.psi.impl.FakePsiElement.getTextRange()", "value" : null }, { "name" : "findElementAt", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.findElementAt(int)", "value" : null }, { "name" : "getStartOffsetInParent", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getStartOffsetInParent()", "value" : "0" }, { "name" : "textContains", "desc" : "public boolean com.intellij.psi.impl.FakePsiElement.textContains(char)", "value" : null }, { "name" : "textToCharArray", "desc" : "public char[] com.intellij.psi.impl.FakePsiElement.textToCharArray()", "value" : null }, { "name" : "getPresentableText", "desc" : "public java.lang.String com.intellij.psi.impl.FakePsiElement.getPresentableText()", "value" : "id" }, { "name" : "add", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.add(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "replace", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.replace(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "checkDelete", "desc" : "public void com.intellij.psi.impl.PsiElementBase.checkDelete() throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "delete", "desc" : "public void com.intellij.psi.impl.PsiElementBase.delete() throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "accept", "desc" : "public void com.intellij.psi.impl.PsiElementBase.accept(com.intellij.psi.PsiElementVisitor)", "value" : null }, { "name" : "getContext", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getContext()", "value" : "table:book" }, { "name" : "copy", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.copy()", "value" : null }, { "name" : "addRange", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRange(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addBefore", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addBefore(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addAfter", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addAfter(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "getReference", "desc" : "public com.intellij.psi.PsiReference com.intellij.psi.impl.PsiElementBase.getReference()", "value" : null }, { "name" : "getContainingFile", "desc" : "public com.intellij.psi.PsiFile com.intellij.psi.impl.PsiElementBase.getContainingFile()", "value" : null }, { "name" : "getOriginalElement", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getOriginalElement()", "value" : "column:id" }, { "name" : "getNavigationElement", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getNavigationElement()", "value" : "column:id" }, { "name" : "getUseScope", "desc" : "public com.intellij.psi.search.SearchScope com.intellij.psi.impl.PsiElementBase.getUseScope()", "value" : "Project and Libraries" }, { "name" : "getResolveScope", "desc" : "public com.intellij.psi.search.GlobalSearchScope com.intellij.psi.impl.PsiElementBase.getResolveScope()", "value" : "Project and Libraries" }, { "name" : "getReferences", "desc" : "public com.intellij.psi.PsiReference[] com.intellij.psi.impl.PsiElementBase.getReferences()", "value" : "[Lcom.intellij.psi.PsiReference;@140035ec" }, { "name" : "checkAdd", "desc" : "public void com.intellij.psi.impl.PsiElementBase.checkAdd(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addRangeBefore", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRangeBefore(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addRangeAfter", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRangeAfter(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "findReferenceAt", "desc" : "public com.intellij.psi.PsiReference com.intellij.psi.impl.PsiElementBase.findReferenceAt(int)", "value" : null }, { "name" : "textMatches", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.textMatches(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "textMatches", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.textMatches(java.lang.CharSequence)", "value" : null }, { "name" : "isEquivalentTo", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.isEquivalentTo(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "deleteChildRange", "desc" : "public void com.intellij.psi.impl.PsiElementBase.deleteChildRange(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "isNativeFileType", "desc" : "public static boolean com.intellij.psi.impl.ElementBase.isNativeFileType(com.intellij.openapi.fileTypes.FileType)", "value" : null }, { "name" : "overlayIcons", "desc" : "public static javax.swing.Icon com.intellij.psi.impl.ElementBase.overlayIcons(javax.swing.Icon...)", "value" : null }, { "name" : "buildRowIcon", "desc" : "public static com.intellij.ui.RowIcon com.intellij.psi.impl.ElementBase.buildRowIcon(javax.swing.Icon,javax.swing.Icon)", "value" : null }, { "name" : "transformFlags", "desc" : "public static int com.intellij.psi.impl.ElementBase.transformFlags(com.intellij.psi.PsiElement,int)", "value" : null }, { "name" : "createLayeredIcon", "desc" : "public static com.intellij.ui.RowIcon com.intellij.psi.impl.ElementBase.createLayeredIcon(com.intellij.openapi.util.Iconable,javax.swing.Icon,int)", "value" : null }, { "name" : "iconWithVisibilityIfNeeded", "desc" : "public static javax.swing.Icon com.intellij.psi.impl.ElementBase.iconWithVisibilityIfNeeded(int,javax.swing.Icon,javax.swing.Icon)", "value" : null }, { "name" : "registerIconLayer", "desc" : "public static void com.intellij.psi.impl.ElementBase.registerIconLayer(int,javax.swing.Icon)", "value" : null }, { "name" : "replace", "desc" : "public <T> boolean com.intellij.openapi.util.UserDataHolderBase.replace(com.intellij.openapi.util.Key<T>,T,T)", "value" : null }, { "name" : "getUserData", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.getUserData(com.intellij.openapi.util.Key<T>)", "value" : null }, { "name" : "copyUserDataTo", "desc" : "public void com.intellij.openapi.util.UserDataHolderBase.copyUserDataTo(com.intellij.openapi.util.UserDataHolderBase)", "value" : null }, { "name" : "isUserDataEmpty", "desc" : "public boolean com.intellij.openapi.util.UserDataHolderBase.isUserDataEmpty()", "value" : "false" }, { "name" : "putUserData", "desc" : "public <T> void com.intellij.openapi.util.UserDataHolderBase.putUserData(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "getCopyableUserData", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.getCopyableUserData(com.intellij.openapi.util.Key<T>)", "value" : null }, { "name" : "putCopyableUserData", "desc" : "public <T> void com.intellij.openapi.util.UserDataHolderBase.putCopyableUserData(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "copyCopyableDataTo", "desc" : "public void com.intellij.openapi.util.UserDataHolderBase.copyCopyableDataTo(com.intellij.openapi.util.UserDataHolderBase)", "value" : null }, { "name" : "getUserDataString", "desc" : "public java.lang.String com.intellij.openapi.util.UserDataHolderBase.getUserDataString()", "value" : "{CACHED_SMART_POINTER_KEY=com.intellij.reference.SoftReference@1e1e2d40}" }, { "name" : "putUserDataIfAbsent", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.putUserDataIfAbsent(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "getTextRangeInParent", "desc" : "public default com.intellij.openapi.util.TextRange com.intellij.psi.PsiElement.getTextRangeInParent()", "value" : "(0,0)" }, { "name" : "getDbParent", "desc" : "public default com.intellij.database.model.DasObject com.intellij.database.model.DasObject.getDbParent()", "value" : "table:book" }, { "name" : "getDbChildren", "desc" : "public default <C> com.intellij.util.containers.JBIterable<C> com.intellij.database.model.DasObject.getDbChildren(java.lang.Class<C>,com.intellij.database.model.ObjectKind)", "value" : null }, { "name" : "getDependencies", "desc" : "public default java.lang.Object[] com.intellij.psi.meta.PsiMetaData.getDependencies()", "value" : "[Ljava.lang.Object;@4c90ae3f" }, { "name" : "getDependences", "desc" : "public default java.lang.Object[] com.intellij.psi.meta.PsiMetaData.getDependences()", "value" : "[Ljava.lang.Object;@4c90ae3f" } ], "----" : "-----------------我是一条华丽的分割线-----------------", "fieldList" : [ { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@689a33b9" }, { "name" : "WEIGHT_BASE", "type" : "int", "value" : "10000" }, { "name" : "WEIGHT_INC", "type" : "int", "value" : "1000" }, { "name" : "myParent", "type" : "com.intellij.database.psi.DbElement", "value" : "table:book" }, { "name" : "myDelegate", "type" : "java.lang.Object", "value" : "id: column" }, { "name" : "myTransactionalVersion", "type" : "long", "value" : "11" }, { "name" : "ASYNC_DOC_CUT", "type" : "java.lang.String", "value" : "<!-- async-doc-cut -->" }, { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@63538153" }, { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@57ae08e7" }, { "name" : "FLAGS_LOCKED", "type" : "int", "value" : "2048" }, { "name" : "ICON_COMPUTE", "type" : "com.intellij.util.NullableFunction", "value" : "com.intellij.psi.impl.ElementBase$$Lambda$705/682411935@622e87c4" }, { "name" : "VISIBILITY_ICON_PLACEHOLDER", "type" : "com.intellij.openapi.util.NotNullLazyValue", "value" : "com.intellij.psi.impl.ElementBase$1@5b1067c3" }, { "name" : "ICON_PLACEHOLDER", "type" : "com.intellij.openapi.util.NotNullLazyValue", "value" : "com.intellij.psi.impl.ElementBase$2@24b63ceb" }, { "name" : "ourIconLayers", "type" : "java.util.List", "value" : "[com.intellij.psi.impl.ElementBase$IconLayer@3f8e1aa, com.intellij.psi.impl.ElementBase$IconLayer@157e46b6, com.intellij.psi.impl.ElementBase$IconLayer@4d0815a5, com.intellij.psi.impl.ElementBase$IconLayer@58cc298b]" }, { "name" : "COPYABLE_USER_MAP_KEY", "type" : "com.intellij.openapi.util.Key", "value" : "COPYABLE_USER_MAP_KEY" }, { "name" : "myUserMap", "type" : "com.intellij.util.keyFMap.KeyFMap", "value" : "{CACHED_SMART_POINTER_KEY=com.intellij.reference.SoftReference@1e1e2d40}" }, { "name" : "updater", "type" : "com.intellij.util.concurrency.AtomicFieldUpdater", "value" : "com.intellij.util.concurrency.AtomicFieldUpdater@1c7d7689" } ] } //调试列原始列类型 { "title" : "调试:com.intellij.database.model.DataType", "methodList" : [ { "name" : "getLength", "desc" : "public int com.intellij.database.model.DataType.getLength()", "value" : "11" }, { "name" : "getScale", "desc" : "public int com.intellij.database.model.DataType.getScale()", "value" : "0" }, { "name" : "getPrecision", "desc" : "public int com.intellij.database.model.DataType.getPrecision()", "value" : "11" }, { "name" : "getSpecification", "desc" : "public java.lang.String com.intellij.database.model.DataType.getSpecification()", "value" : "int(11)" }, { "name" : "getSpecification", "desc" : "public java.lang.String com.intellij.database.model.DataType.getSpecification(boolean,boolean)", "value" : null }, { "name" : "equalsWithoutJdbc", "desc" : "public boolean com.intellij.database.model.DataType.equalsWithoutJdbc(com.intellij.database.model.DataType)", "value" : null } ], "----" : "-----------------我是一条华丽的分割线-----------------", "fieldList" : [ { "name" : "MAX_SIZE", "type" : "int", "value" : "2147483647" }, { "name" : "STAR_SIZE", "type" : "int", "value" : "2147483646" }, { "name" : "NO_SIZE", "type" : "int", "value" : "-1" }, { "name" : "NO_SCALE", "type" : "int", "value" : "0" }, { "name" : "UNKNOWN", "type" : "com.intellij.database.model.DataType", "value" : "unknown" }, { "name" : "schemaName", "type" : "java.lang.String", "value" : null }, { "name" : "packageName", "type" : "java.lang.String", "value" : null }, { "name" : "typeName", "type" : "java.lang.String", "value" : "int" }, { "name" : "size", "type" : "int", "value" : "11" }, { "name" : "scale", "type" : "int", "value" : "0" }, { "name" : "sizeUnit", "type" : "com.intellij.database.model.LengthUnit", "value" : "com.intellij.database.model.LengthUnit@257447ef" }, { "name" : "vagueArg", "type" : "java.lang.String", "value" : null }, { "name" : "suffix", "type" : "java.lang.String", "value" : null }, { "name" : "sizeUnitExplicit", "type" : "boolean", "value" : "false" }, { "name" : "custom", "type" : "boolean", "value" : "false" }, { "name" : "enumValues", "type" : "java.util.List", "value" : null }, { "name" : "jdbcType", "type" : "int", "value" : "0" } ] } //获取原始列类型中的字段 sqlType = int //执行原始列类型中的方法 sqlTypeLen = 11
IntelliJ里找不到In class,编译说sun.java2d.cmm程序包未导出,请问在哪下载这个包?
,自己找不到这个包,在IntelliJ安装目录和JDK里都没有, ![图片说明](https://img-ask.csdn.net/upload/201906/15/1560534711_716544.png)
idea热部署后spring mvc 卡住 进不到请求的方法
环境: idea 14 tomcat 7 jrebel 6.2.0 spring 4.2.6 jdk1.7 热部署后我反编译看class文件确实更新了,但spring mvc 源码卡在DispatcherServlet.java getHandler方法上
html java 注册的问题
我的注册用文件名字为register.html,注册的相应操作写不好,请仔细回答,解决了立马采纳 问题1:register.html 应该放在哪个位置,相应的访问路径应该怎么写,例如 localhost:8080/.....(此部分需要补充,编译工具为intellij idea) 问题2:<input name="" type="button" class="btn btn-default radius size-L" value="&nbsp;注&nbsp;&nbsp;&nbsp;&nbsp;测&nbsp;">应该怎么写 ![图片说明](https://img-ask.csdn.net/upload/201612/20/1482226048_445931.png) <div class="row"> <div class="formControls col-8 col-offset-3"> <input id="loginBtn" name="" type="button" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;"/> <input name="" type="button" class="btn btn-default radius size-L" value="&nbsp;注&nbsp;&nbsp;&nbsp;&nbsp;测&nbsp;"> </div> </div>
javaweb小项目,写添加功能时出错了检查了几遍sql没找到错误,但从报错信息来看是sql写错了?
在写emp这张表的添加功能时遇到错误了,但是找不到解决的办法。。。。 sql语句检查好几遍了,也找不到是哪里错了。 下面是图和错误信息。 ![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894627_921952.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894635_586062.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894640_845708.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894648_593949.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894656_691023.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894666_634817.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894683_320059.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894687_712206.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894695_287559.png)![图片说明](https://img-ask.csdn.net/upload/201912/09/1575894700_310688.png) 错误信息:在表单页面点击立即提交就报错 ``` [2019-12-09 08:10:13,721] Artifact 人事工资管理系统(psms):war exploded: Artifact is being deployed, please wait... 09-Dec-2019 20:10:14.925 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 [2019-12-09 08:10:15,033] Artifact 人事工资管理系统(psms):war exploded: Artifact is deployed successfully [2019-12-09 08:10:15,033] Artifact 人事工资管理系统(psms):war exploded: Deploy took 1,312 milliseconds DEBUG [http-nio-555-exec-5] - Logging initialized using 'class org.apache.ibatis.logging.log4j.Log4jImpl' adapter. DEBUG [http-nio-555-exec-5] - PooledDataSource forcefully closed/removed all connections. DEBUG [http-nio-555-exec-5] - PooledDataSource forcefully closed/removed all connections. DEBUG [http-nio-555-exec-5] - PooledDataSource forcefully closed/removed all connections. DEBUG [http-nio-555-exec-5] - PooledDataSource forcefully closed/removed all connections. DEBUG [http-nio-555-exec-5] - Opening JDBC Connection DEBUG [http-nio-555-exec-5] - Created connection 1428244206. DEBUG [http-nio-555-exec-5] - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] DEBUG [http-nio-555-exec-5] - ==> Preparing: select * from emp where username=? and password=? DEBUG [http-nio-555-exec-5] - ==> Parameters: root(String), aias(String) DEBUG [http-nio-555-exec-5] - <== Total: 1 DEBUG [http-nio-555-exec-5] - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] DEBUG [http-nio-555-exec-5] - Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] DEBUG [http-nio-555-exec-5] - Returned connection 1428244206 to pool. 09-Dec-2019 20:10:23.398 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [C:\apache-tomcat-9.0.27-windows-x64\apache-tomcat-9.0.27\webapps\manager] 09-Dec-2019 20:10:23.482 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-9.0.27-windows-x64\apache-tomcat-9.0.27\webapps\manager] has finished in [83] ms DEBUG [http-nio-555-exec-10] - Opening JDBC Connection DEBUG [http-nio-555-exec-10] - Checked out connection 1428244206 from pool. DEBUG [http-nio-555-exec-10] - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] DEBUG [http-nio-555-exec-10] - ==> Preparing: select max(id) from emp DEBUG [http-nio-555-exec-10] - ==> Parameters: DEBUG [http-nio-555-exec-10] - <== Total: 1 DEBUG [http-nio-555-exec-10] - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] DEBUG [http-nio-555-exec-10] - Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] DEBUG [http-nio-555-exec-10] - Returned connection 1428244206 to pool. DEBUG [http-nio-555-exec-10] - Opening JDBC Connection DEBUG [http-nio-555-exec-10] - Checked out connection 1428244206 from pool. DEBUG [http-nio-555-exec-10] - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] DEBUG [http-nio-555-exec-10] - ==> Preparing: insert into emp(id,empno,username,password,ename,sex,birthday,email,call,pname,deptno,state,permissions) values (?,?,?,?,?,?,?,?,?,?,?,?,?) DEBUG [http-nio-555-exec-10] - ==> Parameters: 28(Integer), 028(String), test(String), test(String), 测试(String), 男(String), 2019-12-09(String), 777777777@qq.com(String), 11111111111(String), 接待员(String), 001(String), 在职(String), 普通员工(String) java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) DEBUG [http-nio-555-exec-10] - Rolling back JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] at java.lang.reflect.Method.invoke(Method.java:498) DEBUG [http-nio-555-exec-10] - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] DEBUG [http-nio-555-exec-10] - Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@552146ee] at com.cdx.psms.utils.TransactionInvocationHandler.invoke(TransactionInvocationHandler.java:30) DEBUG [http-nio-555-exec-10] - Returned connection 1428244206 to pool. at com.sun.proxy.$Proxy5.add(Unknown Source) at com.cdx.psms.controller.Emp_InsertAddServlet.doPost(Emp_InsertAddServlet.java:46) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call,pname,deptno,state,permissions) values (28,'028','test','te' at line 2 ### The error may exist in com/cdx/psms/mapper/EmpMapper.xml ### The error may involve emp.add-Inline ### The error occurred while setting parameters ### SQL: insert into emp(id,empno,username,password,ename,sex,birthday,email,call,pname,deptno,state,permissions) values (?,?,?,?,?,?,?,?,?,?,?,?,?) ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call,pname,deptno,state,permissions) values (28,'028','test','te' at line 2 at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199) at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184) at com.cdx.psms.dao.EmpDaoImpl.add(EmpDaoImpl.java:42) at com.cdx.psms.service.EmpServiceImpl.add(EmpServiceImpl.java:26) ... 31 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call,pname,deptno,state,permissions) values (28,'028','test','te' at line 2 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) at com.mysql.jdbc.Util.getInstance(Util.java:408) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2675) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1912) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1251) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) at com.sun.proxy.$Proxy7.execute(Unknown Source) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ... 34 more ```
idea java10 模块化启动spring cloud 编译缺少maven 中的模块依赖
![图片说明](https://img-ask.csdn.net/upload/201808/22/1534923589_922868.jpg) **1. 模块代码** ``` module joker{ requires java.xml; requires spring.boot; requires spring.boot.autoconfigure; requires spring.cloud.netflix.eureka.server; } ``` **2. 启动主程序** ``` @SpringBootApplication @EnableEurekaServer public class JokerMain { public static void main(String[] args) { SpringApplication.run(JokerMain.class,args); //new SpringApplicationBuilder(JokerMain.class).run(args); } } ``` **3. maven配置** ``` <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"> <parent> <artifactId>learn_cloud_parent</artifactId> <groupId>com.joker.learn</groupId> <version>1.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>first-ek-server</artifactId> <dependencyManagement> <dependencies> <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Edgware.SR4</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-eureka-server --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka-server</artifactId> <version>1.4.5.RELEASE</version> </dependency> </dependencies> </project> ``` 现在如果添加模块的module-info.java的文件就编译都通过不了,编译错误如上图,下面给出一点 _Error:java: 未命名的模块同时从 ribbon.httpclient 和 ribbon.loadbalancer 读取程序包 com.netflix.loadbalancer Error:java: 未命名的模块同时从 ribbon.core 和 ribbon.loadbalancer 读取程序包 com.netflix.client Error:java: 未命名的模块同时从 ribbon.core 和 ribbon.httpclient 读取程序包 com.netflix.client.http Error:java: 未命名的模块同时从 xmlpull 和 xpp3.min 读取程序包 org.xmlpull.v1 Error:java: 模块 spring.context 同时从 xmlpull 和 xpp3.min 读取程序包 org.xmlpull.v1 Error:java: 模块 spring.context 同时从 ribbon.core 和 ribbon.httpclient 读取程序包 com.netflix.client.http Error:java: 模块 spring.context 同时从 ribbon.httpclient 和 ribbon.loadbalancer 读取程序包 com.netflix.loadbalancer_ ,对于项目jdk采用的是10,相关配置,全部都对应的修改为jdk10了,别的代码一点没有了,请教如何通过编译,
debug经常进入莫名其妙的class文件,执行其中的方法,其中就有ThreadPoolExecutor,invoke等等
![图片说明](https://img-ask.csdn.net/upload/201904/24/1556072273_380076.png) 一直解决不了,老是调到这些类中,不能正常执行打了断点的代码,我使用的编译工具是IDEA,有没有大佬知道怎么解决呀,万分感谢
IDEA做SSM框架整合时,出现无法加载mapper,导致无法注入。
今日学习SSM框架整合,整合以后,单独用测试类可以连接成功连接数据库,可是一加入MVC用TOMCAT启动,项目就会报错,错误内容为:Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 以下为项目各部分截图,有没有大佬帮我分析下,问题到底出在哪? ========================================================================================================================================== ![项目报错详细情况](https://img-ask.csdn.net/upload/201908/15/1565880941_652575.png) ## 项目报错详细情况 ![spring配置文件已经配置了mapper.xml路径和齐对应的接口扫描包](https://img-ask.csdn.net/upload/201908/15/1565880955_958792.png) ## spring配置文件已经配置了mapper.xml路径和齐对应的接口扫描包 ![编译文件夹target里已经编译出了mapper相关配置文件及接口类](https://img-ask.csdn.net/upload/201908/15/1565881099_526884.png) ## 编译文件夹target里已经编译出了mapper相关配置文件及接口类 ![mapper.xml里的namespace已经指明了接口路径](https://img-ask.csdn.net/upload/201908/15/1565881139_161198.png) ## mapper.xml里的namespace已经指明了接口路径 ![pom文件里也配置了resource源](https://img-ask.csdn.net/upload/201908/15/1565881159_416309.png) ## pom文件里也配置了resource源 ========================================================================================================================================== # 详细代码已经贴在下方,只选了几个配置文件及mapper接口类,service及controller应该没关系就没传! ============================================= # mybatis-config.xml ``` <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <!--添加缓存 引入第三方二级缓存 --> <settings> <setting name="mapUnderscoreToCamelCase" value="true"/> <setting name="cacheEnabled" value="false"/> </settings> <!-- 配置数据源 default默认使用的数据源 --> <environments default="mysql"> <environment id="mysql"> <transactionManager type="JDBC" /> <dataSource type="POOLED"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql:///orderuser"/> <property name="username" value="zhijia3278"/> <property name="password" value="0528"/> </dataSource> </environment> </environments> <!-- 映射文件 --> <mappers> <mapper resource="OrderUserMapper.xml"/> </mappers> </configuration> ``` # OrderUserMapper.java ``` package cn.tedu.mapper; import cn.tedu.domain.Order; import cn.tedu.domain.User; public interface OrderUserMapper { public User queryUser(String userId); public Order queryOrder(String orderId); public void updateUserPoints(User user); } ``` # OrderUserMapper.xml ``` <?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="cn.tedu.mapper.OrderUserMapper"> <select id="queryUser" parameterType="String" resultType="User"> select * from t_user where user_id=#{userId} </select> <select id="queryOrder" parameterType="String" resultType="Order"> select * from t_order where order_id=#{orderId} </select> <update id="updateUserPoints" parameterType="User"> update t_user set points=#{points} where user_id=#{userId} </update> </mapper> ``` # spring.xml ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!-- 配置内容 --> <context:component-scan base-package="cn.tedu"> </context:component-scan> <context:annotation-config></context:annotation-config> <!-- 持久层数据源 --> <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"> <!-- 4个属性 --> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql:///orderuser"/> <property name="username" value="zhijia3278"/> <property name="password" value="0528"/> </bean> <!-- sqlSession --> <bean id="sqlSession" class="org.mybatis.spring.SqlSessionFactoryBean"> <!-- 数据源注入 --> <property name="dataSource" ref="dataSource"/> <!-- 扫描mybatis的独立配置文件 关闭二级缓存,驼峰命名 --> <property name="configLocation" value="classpath:mybatis/mybatis-config.xml"/> <!-- 映射文件扫描 --> <property name="mapperLocations" value="classpath:mapper/OrderUserMapper.xml" /> <!-- 别名包 --> <property name="typeAliasesPackage" value="cn.tedu.domain"></property> </bean> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <!-- 扫描的接口包 cn.tedu.mapper --> <property name="basePackage" value="cn.tedu.mapper"/> </bean> <!-- 注解驱动开启,@RequestMapping @RequestParam等 --> <mvc:annotation-driven/> <!-- 防止静态文件js css html访问被dispacherServlet拦截 --> <!-- localhost静态文件根目录 /static /js /css --> <!-- mapping 满足什么样子的访问地址 http://localhost:8080/js//1.js --> <mvc:resources location="/" mapping="/**"></mvc:resources> </beans> ``` # springmvc-servlet ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!-- 配置内容 --> <context:component-scan base-package="cn.tedu"/> <!-- 注解驱动开启,@RequestMapping @RequestParam等 --> <mvc:annotation-driven/> <!-- 防止静态文件js css html访问被dispacherServlet拦截 --> <!-- localhost静态文件根目录 /static /js /css --> <!-- mapping 满足什么样子的访问地址 http://localhost:8080/js//1.js --> <mvc:resources location="/" mapping="/**"></mvc:resources> </beans> ``` # web.xml ``` <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>Archetype Created Web Application</display-name> <servlet> <servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <!-- tomcat启动加载spring.xml --> <!-- <init-param>--> <!-- <param-name>contextConfigLocation</param-name>--> <!-- <param-value>classpath:springmvc/springmvc-servlet.xml</param-value>--> <!-- </init-param>--> </servlet> <servlet-mapping> <servlet-name>springmvc</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> </web-app> ``` # pom.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>cn.tedu</groupId> <artifactId>SSMDemo</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <name>SSM-DEMO01 Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <!-- <dependency>--> <!-- <groupId>junit</groupId>--> <!-- <artifactId>junit</artifactId>--> <!-- <version>4.12</version>--> <!-- <scope>compile</scope>--> <!-- </dependency>--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.3.13.RELEASE</version> </dependency> <!-- datasource --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.14</version> </dependency> <!-- spring mysql --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>4.3.13.RELEASE</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.0.8</version> </dependency> <!-- mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.5</version> </dependency> <!-- spring mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.1</version> </dependency> <!-- springmvc --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.3.13.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.3.13.RELEASE</version> </dependency> <!-- jackson --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.8.8</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.8.8</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.8.8</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> </dependencies> <build> <finalName>SSM-DEMO01</finalName> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <!-- 插件属性配置 --> <configuration> <!-- 端口 --> <port>8080</port> <!-- 项目访问路径 --> <path>/</path> <!-- 编解码 --> <uriEncoding>utf-8</uriEncoding> <useBodyEncodingForURI>true</useBodyEncodingForURI> </configuration> </plugin> </plugins> <resources> <resource> <directory>resource</directory> <includes> <include>**/*.xml</include> <include>mapper/*.xml</include> <include>mybatis/*.xml</include> <include>spring/*.xml</include> </includes> <!-- <filtering>true</filtering>--> </resource> </resources> </build> </project> ```
关于sping-security的Access is denied问题
编译时没问题,但是刚进到网页的时候就会报Access is denied,但是却不妨碍登陆,登陆进去查询,添加都能完成,求各位大神指点! **这是一个ssm整合的项目** 日志 ``` org.springframework.security.access.AccessDeniedException: Access is denied at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:84) at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:233) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:124) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ``` sping-security.xml配置文件 ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:security="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd"> <!-- 配置不拦截的资源 --> <security:http pattern="/login.jsp" security="none"/> <security:http pattern="/failer.jsp" security="none"/> <security:http pattern="/css/**" security="none"/> <security:http pattern="/img/**" security="none"/> <security:http pattern="/plugins/**" security="none"/> <!-- 配置具体的规则 auto-config="true" 不用自己编写登录的页面,框架提供默认登录页面 use-expressions="false" 是否使用SPEL表达式(没学习过) --> <security:http auto-config="true" use-expressions="false"> <!-- 配置具体的拦截的规则 pattern="请求路径的规则" access="访问系统的人,必须有ROLE_USER的角色" --> <security:intercept-url pattern="/**" access="ROLE_USER,ROLE_ADMIN"/> <!-- 定义跳转的具体的页面 --> <security:form-login login-page="/login.jsp" login-processing-url="/login.do" default-target-url="/index.jsp" authentication-failure-url="/failer.jsp" authentication-success-forward-url="/pages/main.jsp" /> <!-- 关闭跨域请求 --> <security:csrf disabled="true"/> <!-- 退出 --> <security:logout invalidate-session="true" logout-url="/logout.do" logout-success-url="/login.jsp" /> </security:http> <!-- 切换成数据库中的用户名和密码 --> <security:authentication-manager> <security:authentication-provider user-service-ref="userService"> <!--配置加密的方式--> <!--<security:password-encoder ref="passwordEncoder"/>--> </security:authentication-provider> </security:authentication-manager> <!-- 配置加密类 --> <bean id="passwordEncoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"/> </beans> ``` ``` @Override public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException { UserInfo userInfo = null; try { userInfo = userDao.findByUsername(s); } catch (Exception e) { e.printStackTrace(); } //User user = new User(userInfo.getUsername(),"{noop}"+userInfo.getPassword(),getAuthority(userInfo.getRoles())); User user = new User(userInfo.getUsername(),"{noop}"+userInfo.getPassword(),userInfo.getStatus() == 0 ? false : true,true,true,true,getAuthority(userInfo.getRoles())); return user; } public List<SimpleGrantedAuthority> getAuthority(List<Role> roles){ List<SimpleGrantedAuthority> list = new ArrayList<>(); for (Role role:roles){ list.add(new SimpleGrantedAuthority("ROLE_"+role.getRoleName())); } return list; } ```
springboot项目编译失败,无法找到主类
最近再用springcloud开发,项目结构如下 zy(父类工程,定义各模块,指定模块依赖jar版本) |------------------------------ |--config-core 核心配置类 | |-- applet-service app接口 依赖da-core | |-- manage-service 后台管理接口 依赖da-core | |-- eureka-service eureka注册中心 打包 manage-service的时候报错 ``` Failed to execute goal on project applet-service: Could not resolve dependencies for project com.zhancheng:applet-service:jar:0.0.1-SNAPSHOT: Could not find artifact com.zhancheng:config-core:jar:0.0.1-SNAPSHOT ``` 没有找到config-core,我又尝试install config-core,报错 ``` Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage (repackage) on project config-core: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage failed: Unable to find main class ``` 没有找到主类,但是这个项目本身是没有主类的啊,主类在applet-service和manage-service. 项目是在本地能跑的,但是想打包部署到服务器上,请问应该怎么做?
Springboot启动报错 一个是找不到url 一个是找不到dao
## 之前一直启动都没有问题,今天突然发现启动不了 ![图片说明](https://img-ask.csdn.net/upload/201910/10/1570671612_490949.jpg) ## 然后我把启动的位置改成@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) ``` package com.mall.shopping.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; /*@SpringBootApplication*/ @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } } ``` ## 然后会报新的错: ![图片说明](https://img-ask.csdn.net/upload/201910/10/1570671806_766601.jpg) # 到现在没找到新错误的原因 还是在报找不到dao的错误。 ## 实体类代码: ![图片说明](https://img-ask.csdn.net/upload/201910/10/1570672651_585106.jpg) ## controller代码: ``` package com.mall.shopping.demo.controller; import com.mall.shopping.demo.services.UserService; import com.mall.shopping.demo.vo.Huser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Iterator; import java.util.List; @Controller public class UserController { @Autowired private UserService userService; @RequestMapping("/tiao") public ModelAndView zhuan() { ModelAndView modelAndView = new ModelAndView("loginindex"); return modelAndView; } @RequestMapping("/tiao1") public ModelAndView zhuan1() { ModelAndView modelAndView = new ModelAndView("adminindex"); return modelAndView; } @RequestMapping("/Userlogin") public String userlogin(HttpServletRequest request, HttpServletResponse response) { String username = (String) request.getParameter("username"); String userpwd = (String)request.getParameter("userpwd"); List<Huser> huser = userService.userlogin(); Iterator iter = huser.iterator(); while(iter.hasNext()){ Huser ha = (Huser) iter.next(); if(username.equals(ha.getHuser())) { if(userpwd.equals(ha.getHpwd())) { return "redirect:/tiao1"; } else { return "redirect:/tiao"; } } } return "redirect:/tiao"; } } ``` ## services代码: ``` package com.mall.shopping.demo.services; import com.mall.shopping.demo.dao.UserDao; import com.mall.shopping.demo.vo.Huser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class UserService { @Autowired private UserDao userDao; public List<Huser> userlogin(){ return userDao.userlogin();} } ``` ## daoceng代码: ``` package com.mall.shopping.demo.dao; import com.mall.shopping.demo.vo.Huser; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; import java.util.List; @Repository @Mapper public interface UserDao { List<Huser>userlogin(); } ``` ## mybatitsconfig: ``` <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <!-- 开启驼蜂标识:last_name lastName --> <settings> <setting name="mapUnderscoreToCamelCase" value="true"/> </settings> <!-- 实体Bean别名 --> <typeAliases> <package name="com.mall.shopping.demo.vo.Huser"/> <package name="com.mall.shopping.demo.vo.Hdaohang"/> </typeAliases> <mappers> <mapper resource="mapper/select-login.xml"/> <mapper resource="mapper/select-hdaohang.xml"/> </mappers> </configuration> ``` ## xml代码: ``` <?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.mall.shopping.demo.dao.UserDao"> <resultMap id="SelectLogin" type="com.mall.shopping.demo.vo.Huser"> <id property="hid" column="HID"></id> <result property="huser" column="HUSER"></result> <result property="hpwd" column="HPWD"></result> </resultMap> <select id="userlogin" resultMap="SelectLogin"> select * from huser </select> </mapper> ``` ## application.properties ``` server.port=8083 server.address=127.0.0.1 #server.session-timeout=60 spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl spring.datasource.username=scott spring.datasource.password=tiger spring.datasource.driver-class-name=oracle.jdbc.OracleDriver mybatis.mapperLocations=classpath:mapper/*.xml mybatis.config-locations=classpath:mybatis/mybatis-config.xml spring.mvc.view.prefix=/WEB-INF/views/ spring.mvc.view.suffix=.jsp ``` ## pom文件: ``` <?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>2.1.7.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.mall.shopping</groupId> <artifactId>demo</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <name>demo</name> <description>Demo project for Spring Boot</description> <properties> <java.version>1.8</java.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> <spring.version>5.1.5.RELEASE</spring.version> <!-- mybatis版本号 --> <mybatis.version>3.4.5</mybatis.version> <!-- oracle驱动版本号 --> <oracle-driver.version>11.2.0</oracle-driver.version> <!-- log4j日志包版本号 --> <slf4j.version>1.7.18</slf4j.version> <log4j.version>1.2.17</log4j.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <!-- 添加spring核心库 --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <!-- 添加mybatis依赖 --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${mybatis.version}</version> </dependency> <!-- mybatis/spring包 --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>1.3.0</version> </dependency> <!-- oracle驱动依赖 --> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>${oracle-driver.version}</version> </dependency> <!-- dbcp,用来在spring-mybatis.xml中配置数据库 --> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j.version}</version> </dependency> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.3.5</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.12</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId> <version>1.9.12</version> </dependency> <dependency> <groupId>org.xmlunit</groupId> <artifactId>xmlunit-core</artifactId> </dependency> <!-- <dependency> <groupId>com.mchange</groupId> <artifactId>c3p0</artifactId> <version>0.9.5.2</version> </dependency>--> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency> <!--用于编译jsp --> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <scope>provided</scope> </dependency> <!--添加热部署--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <scope>true</scope> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>runtime</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>3.1.0</version> </plugin> <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging --> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>3.0.2</version> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.1</version> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>3.2.2</version> </plugin> <plugin> <artifactId>maven-install-plugin</artifactId> <version>2.5.2</version> </plugin> <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </plugin> <!--热部署配置--> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <!--fork:如果没有该项配置,整个devtools不会起作用--> <fork>true</fork> </configuration> </plugin> <!-- <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <versionRange>[1.2,)</versionRange> <goals> <goal>enforce</goal> </goals> </pluginExecutionFilter> <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin>--> <!--mybatis 逆向工程插件--> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.5</version> <configuration> <configurationFile>src/main/resources/mybatis-generator/generatorConfig.xml</configurationFile> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> <executions> <execution> <id>Generate MyBatis Artifacts</id> <goals> <goal>generate</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>${oracle-driver.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.3.5</version> </dependency> </dependencies> </plugin> </plugins> <!-- <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> <resource> <directory>src/main/resources</directory> </resource> </resources>--> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources> </build> </project> ``` ## 目录结构: ![图片说明](https://img-ask.csdn.net/upload/201910/10/1570672730_102043.jpg)
引入ref sqlSessionFactory 报红
``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!--读取数据源文件--> <context:property-placeholder location="jdbc.properties"></context:property-placeholder> <!--配置数据源--> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="jdbcUrl" value="${jdbc.url}"></property> <property name="user" value="${jdbc.username}"></property> <property name="password" value="${jdbc.password}"></property> <property name="driverClass" value="${jdbc.driver}"></property> </bean> <!--组件扫描--> <context:component-scan base-package="com.xxx"></context:component-scan> <!--spring整合mybatis--> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean" > <property name="configLocation" value="mybatis-config.xml"></property> <property name="dataSource" ref="dataSource"></property> </bean> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer" id="mapperScannerConfigurer"> <property name="basePackage" value="com.xxx.mapper"></property> <property name="sqlSessionFactoryBeanName" ref="sqlSessionFactory"></property> </bean> <!--mvc--> <mvc:annotation-driven></mvc:annotation-driven> </beans> ``` 引入sqlSessionFactory时编译器报红什么情况? ``` <property name="sqlSessionFactoryBeanName" ref="sqlSessionFactory"></property> ```这个地方报错
Kafka实战(三) - Kafka的自我修养与定位
Apache Kafka是消息引擎系统,也是一个分布式流处理平台(Distributed Streaming Platform) Kafka是LinkedIn公司内部孵化的项目。LinkedIn最开始有强烈的数据强实时处理方面的需求,其内部的诸多子系统要执行多种类型的数据处理与分析,主要包括业务系统和应用程序性能监控,以及用户行为数据处理等。 遇到的主要问题: 数据正确性不足 数据的收集主要...
volatile 与 synchronize 详解
Java支持多个线程同时访问一个对象或者对象的成员变量,由于每个线程可以拥有这个变量的拷贝(虽然对象以及成员变量分配的内存是在共享内存中的,但是每个执行的线程还是可以拥有一份拷贝,这样做的目的是加速程序的执行,这是现代多核处理器的一个显著特性),所以程序在执行过程中,一个线程看到的变量并不一定是最新的。 volatile 关键字volatile可以用来修饰字段(成员变量),就是告知程序任何对该变量...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
有哪些让程序员受益终生的建议
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。 敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,如何在工作中游刃有余,这篇文章很长,但绝对是精品,记得帮我点赞哦!!!! 一腔肺腑之言,能看进去多少,就看你自己了!!! 目录: 在校生篇: 为什么要尽量进大厂? 如何选择语言及方...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
GitHub开源史上最大规模中文知识图谱
近日,一直致力于知识图谱研究的 OwnThink 平台在 Github 上开源了史上最大规模 1.4 亿中文知识图谱,其中数据是以(实体、属性、值),(实体、关系、实体)混合的形式组织,数据格式采用 csv 格式。 到目前为止,OwnThink 项目开放了对话机器人、知识图谱、语义理解、自然语言处理工具。知识图谱融合了两千五百多万的实体,拥有亿级别的实体属性关系,机器人采用了基于知识图谱的语义感...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
微信支付崩溃了,但是更让马化腾和张小龙崩溃的竟然是……
loonggg读完需要3分钟速读仅需1分钟事件还得还原到昨天晚上,10 月 29 日晚上 20:09-21:14 之间,微信支付发生故障,全国微信支付交易无法正常进行。然...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
刷了几千道算法题,这些我私藏的刷题网站都在这里了!
遥想当年,机缘巧合入了 ACM 的坑,周边巨擘林立,从此过上了"天天被虐似死狗"的生活… 然而我是谁,我可是死狗中的战斗鸡,智力不够那刷题来凑,开始了夜以继日哼哧哼哧刷题的日子,从此"读题与提交齐飞, AC 与 WA 一色 ",我惊喜的发现被题虐既刺激又有快感,那一刻我泪流满面。这么好的事儿作为一个正直的人绝不能自己独享,经过激烈的颅内斗争,我决定把我私藏的十几个 T 的,阿不,十几个刷题网...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
白话阿里巴巴Java开发手册高级篇
不久前,阿里巴巴发布了《阿里巴巴Java开发手册》,总结了阿里巴巴内部实际项目开发过程中开发人员应该遵守的研发流程规范,这些流程规范在一定程度上能够保证最终的项目交付质量,通过在时间中总结模式,并推广给广大开发人员,来避免研发人员在实践中容易犯的错误,确保最终在大规模协作的项目中达成既定目标。 无独有偶,笔者去年在公司里负责升级和制定研发流程、设计模板、设计标准、代码标准等规范,并在实际工作中进行...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
YouTube排名第一的励志英文演讲《Dream(梦想)》
Idon’t know what that dream is that you have, I don't care how disappointing it might have been as you've been working toward that dream,but that dream that you’re holding in your mind, that it’s po...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
相关热词 c# 引用mysql c#动态加载非托管dll c# 两个表数据同步 c# 返回浮点json c# imap 链接状态 c# 漂亮字 c# 上取整 除法 c#substring c#中延时关闭 c#线段拖拉
立即提问